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 : Friday, May 12, 2006 7:54:22 AM(UTC)

nubber  
nubber

Groups: Registered
Posts: 2


I am using the RasterCodecs' Convert function to convert preexisting tiffs in any format to G4Tiffs but when I look at the output images it is only reading the first page.  Does anyone know of a way around this?
 

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, May 16, 2006 2:49:50 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,040

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

You are probably using the wrong overloads of the Load and Save methods.  Try using this syntax:

Image = Codecs.Load(sourceFile, 0, 0, 1, -1);
Codec.Save(Image, targetFile, Tif, 24, 1, Image.PageCount, 1, Append);

 
#3 Posted : Tuesday, July 18, 2006 4:36:20 AM(UTC)
CharlieBarrett2

Groups: Registered
Posts: 2


I don't understand this answer, because the Convert function does not require Load() and Save()

I'm having the same problem - Only one TIFF page being saved with Convert(), and also with Load() /Resize/ Save(), if I do it that way - The source image has 3 pages, but the DestinationImage object from the Resize command only has one page! (I'm trying to Resize and convert a standard TIFF to a JPEG-compressed multipage TIFF)

I also notice now that when I step thru pages and resize each page individually and append pages to the file one at a time, a page from the previous image is appearing as the 1st page when I save, even though when I'm stepping thru the file structure, I'm creating new IRasterImage and ResizeCommand objects each time.

This is driving me up the wall, and Help documentation for a lot of .NET properties and Methods only list syntax - It doesn't tell you anything about the purpose or behavior of the Properties & Methods.

For example with Convert, the role of the CodecsImageInfo object is not explained at all - And most of the properties are Read-only!!!! And when I derive the CodecsImageInfo object from the old image (which has the PageCount I want), it has no affect on the output files' PageCount - How do you tell LeadTools to just resize & convert the whole image ?????? It's gotta be simpler than this!

I'm using version 14.0

 
#4 Posted : Tuesday, July 18, 2006 7:33:16 AM(UTC)
CharlieBarrett2

Groups: Registered
Posts: 2


Ahhh... Found the problem with the phantom image being saved to the TIFF file...

I have to save page one of the TIFF using the CodecsSavePageMode.Overwrite option, then use the CodecsSavePageMode.Append on all the other pages.

Using CodecsSavePageMode.Append on a non-existant file seems to be trying to append to some other file in the output directory or something, even though it creates a new file (???)

 
#5 Posted : Wednesday, July 19, 2006 6:02:54 AM(UTC)

Bashar  
Guest

Groups: Guests
Posts: 3,040

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

Using append on a non-existing file should just create the file and save to it. But the approach you are using is also correct.

 
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-2019, Yet Another Forum.NET
This page was generated in 0.197 seconds.