Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, October 25, 2010 12:24:30 PM(UTC)
joepacelli

Groups: Registered
Posts: 2


I'm on a data migration team and I need to convert TIF files. Some of these being multi-page TIF's to BMP files.

I can load the Image in the RasterImageViewer, and can even see the .Image.Page property of this object.

What I need to do now is loop through and save each page as it's own file.

Can I just loop through all the pages and call the codecs.Save and pass it a single Page?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Tuesday, October 26, 2010 1:21:59 AM(UTC)
Maen Hasan

Groups: Registered, Tech Support
Posts: 1,328

Was thanked: 1 time(s) in 1 post(s)

This VB.NET code shows how to load a Multipage TIF (3 pages) and save it into 3 separate BMP files.
+----------+
'Load the image
img = codecs.Load(Application.StartupPath + "\..\combined.TIF", 0, CodecsLoadByteOrder.BgrOrGray, 1, 3)

'Save each page as a separate file.  You might prefer to do a loop
codecs.Save(img, Application.StartupPath + "\..\1.bmp", RasterImageFormat.Bmp, 24, 1, 1, 1, CodecsSavePageMode.Overwrite)
codecs.Save(img, Application.StartupPath + "\..\2.bmp", RasterImageFormat.Bmp, 24, 2, 2, 1, CodecsSavePageMode.Overwrite)
codecs.Save(img, Application.StartupPath + "\..\3.bmp", RasterImageFormat.Bmp, 24, 3, 3, 1, CodecsSavePageMode.Overwrite)
+----------+

Thanks,
Maen Badwan
LEADTOOLS Technical Support
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.051 seconds.