SaveasTiffJPG

Discussions about image processing and document imaging.
Post Reply
SSriram
Posts: 23
Joined: Thu Jan 03, 2008 5:51 pm
Location: Chennai India

SaveasTiffJPG

Post by SSriram » Wed Sep 03, 2008 10:51 am

Hi Loic,

I am using GDPicture Pro 5.6.11 and using the SaveasTiffJPG method. After doing so, GDStat returns 0 (so I am assuming it works right).

However, the saved TIFF file does not open with Microsoft Image Viewer directly. I get an unsupported format error. However, after opening the image with Imagsitix Image Viewer and saving it, the saved tiff file can be opened with Microsoft IMage viewer.

Here's the code snippet:

Code: Select all

                nImageID = Imaging1.CreateImageFromFile(App.Path & "\multipage.jpg")
                Imaging1.ConvertTo8BppGrayScale
                Imaging1.SetNativeImage (nImageID)
                Call Imaging1.SaveAsTIFFjpg(sMultiPageTiffPath)
I am also attaching the multipage.jpg file for your reference. Could you let me know if I am doing anything wrong? TIA.
Attachments
multipage.jpg

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: SaveasTiffJPG

Post by Loïc » Wed Sep 03, 2008 4:22 pm

Hi,

It is because the Microsoft Image Viewer doesn't support tiff image with JPEG compression.

Best regards,

Loïc Carrère

SSriram
Posts: 23
Joined: Thu Jan 03, 2008 5:51 pm
Location: Chennai India

Re: SaveasTiffJPG

Post by SSriram » Thu Sep 04, 2008 6:34 am

Thanks Loic. However, the issue is that Imaging for Windows on XP SP 2 (from eiStream) can actually open the image after it has been saved using Imagistix Image viewer. I used Imagistix to just open and save the image as a TIFF file. Here's the complete sequence:

(a) Take an uncompressed image and save it using GDPICTURE PRO as a JPGinTiff (Size of compressed image - 269 K from original 2 MB, which is excellent :P )
(b) Try opening the compressed image in Imaging for Windows - no dice, cannot open.
(c) Open the compressed image in Imagistix Image viewer (can open)
(d) Save the compresssed image from Imagistix (Do not change any properties) (Size of "Compressed" image - 1012 KB - not so good :| )
(E) Now open the "compressed" image in Imaging for Windows (eiStream) - it will open. Set the page properties to use the JPEG Compression and it will save the image with a final compressed size of 201K.

I am attaching the files for your reference.
(a) The original file is called multipage_uncompressed2.tif. ((not attaching due to post size limitations)
(b) The file after compression in GD PRO is called mtiff6_after_GDPRO.tif
(c) The file after saving with Imagistix is called mtiff6_after_Imagstix.tif
(d) And final file after saving and compression with Imaging for Windows is mtiff6_after_ImagingforWindows_compression.tif
Attachments
multipage_Uncompressed2.zip
(1.42 MiB) Downloaded 304 times

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: SaveasTiffJPG

Post by Loïc » Thu Sep 04, 2008 6:09 pm

Hi,
Thanks Loic. However, the issue is that Imaging for Windows on XP SP 2 (from eiStream) can actually open the image after it has been saved using Imagistix Image viewer.
It's normal, the image saved by Imagistix are compressed using LZW compression.

Code: Select all

(d) Save the compressed image from Imagistix (Do not change any properties) (Size of "Compressed" image - 1012 KB - not so good :| )
Like I said, the compression used is now LZW. It is because this image can be opened using windows imaging.

Best regards,

Loïc Carrère

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest