473,385 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

multipage tiff

Al
Is it possible, using only VB.NET code, to extract a single page from a
multipage tiff file?

Nov 20 '05 #1
3 10982
"Al" <co********@cox.net> wrote in message news:92CEc.8722$mN3.6554@lakeread06...
Is it possible, using only VB.NET code, to extract a single page from a
multipage tiff file?


Yes, it is possible. For example, you can load a multipage tiff image into an image object and select page using the
SelectActiveFrame method in the image object.

Dim img As Image
Dim bmp As Image

img = Image.FromFile(OpenFileDialog1.FileName)
intCurrPage = 2 'Select page 2
intNumPages = img.GetFrameCount(Imaging.FrameDimension.Page)
img.SelectActiveFrame(System.Drawing.Imaging.Frame Dimension.Page, intCurrPage - 1)
bmp = New Bitmap(img, PictureBox1.Width, PictureBox1.Height)

bmp now holds the selected page.

--
Al Reid

How will I know when I get there...
If I don't know where I'm going?
Nov 20 '05 #2

Looks promising, but I am uncertain as to the proper values of
PictureBox1.Width and PictureBox1.Height. Does it matter?

I should have mentioned, this code will be part of a web service that
will return a file(page) as a bytearray to the calling client
application.

Thanks for your kind response.
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #3
Al,

Download and install the ASP.Net Resource Kit. It has examples similar to what you want to do.

http://msdn.microsoft.com/asp.net/asprk/

The ImageService example is in c#, but it is easily converted.

I hope this helps.

--
Al Reid

"It ain't what you don't know that gets you into trouble. It's what you know
for sure that just ain't so." --- Mark Twain

"Al Knowles" <co********@cox.net> wrote in message news:uK****************@TK2MSFTNGP09.phx.gbl...

Looks promising, but I am uncertain as to the proper values of
PictureBox1.Width and PictureBox1.Height. Does it matter?

I should have mentioned, this code will be part of a web service that
will return a file(page) as a bytearray to the calling client
application.

Thanks for your kind response.
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: news.microsoft.com | last post by:
Hello group, My goal is to attach an image over another image. Top image should be transparent so the back image is visible through the top one. Bellow is a test code in VB.NET. You need to...
0
by: Curtis Justus | last post by:
Hi, I am reading in a multipage TIFF image and need to manipulate each page separately. After reading the image into an Image object, I set the page by using the SelectActiveFrame method. ...
2
by: Becker | last post by:
I have a two page TIFF document. I simply want to create an array of image and put the two pages of this multipage tiff in this array for some further processing on seperate "images." The...
0
by: munish | last post by:
Hi, I am trying to send a tiff file which contains multiple pages/frames as a dime attachment. When I am saving the file on the server only the first page of image gets saved. Any Ideasv how to...
2
by: Bdog | last post by:
I've been searching for the file PrintFramework.zip that I've seen linked on tons of posts but all the links are bad. Does anynone know where I can get a copy of this code, I hoping it is what I...
2
by: Hulk | last post by:
Hello, Have anyone of you used any commercial/open source libraries that has a C# API to convert PDF files to Multipage Tiff files? What products are available, can you give any suggestions?...
0
by: Luke | last post by:
I have a big (500+ MB) multipage TIFF image file and a database file which contains index to each image in the TIFF file. The scheme of the database is very simple. imagename (text) byte...
0
by: Luke | last post by:
I have a big (500+ MB) multipage TIFF image file and a database file which contains index to each image in the TIFF file. The scheme of the database is very simple. imagename (text) byte...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.