ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Tiff GrayScale
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

izaque

Brazil
95 Posts

Posted - May 28 2012 :  12:31:22  Show Profile  Reply
In ImageEn manual says that "TIOTiff_Compression" ioTIFF_G4FAX Bilevel Group 4 CCITT compression, bidimensional. "Only black / white images," in the alpha channel.

What is the compression method for grayscale TIFF? ioTIFF_G4FAX?

fab

1310 Posts

Posted - May 28 2012 :  14:47:08  Show Profile  Reply
Gray scale is supported only with:
- ioTIFF_UNCOMPRESSED
- ioTIFF_LZW
- ioTIFF_JPEG
- ioTIFF_PACKBITS
- ioTIFF_ZIP
- ioTIFF_DEFLATE

As described in revision 6.0 of TIFF specification (except for ZIP and DEFLATE).
Go to Top of Page

izaque

Brazil
95 Posts

Posted - May 28 2012 :  16:22:34  Show Profile  Reply
I used the following code for compressing grayscale:

ImgMDigitalizar.MIO.Params [i]. BitsPerSample: = 8;
ImgMDigitalizar.MIO.Params [i]. Samplesperpixel: = 1;

ImgMDigitalizar.MIO.Params [i]. TIFF_Compression: = ioTIFF_JPEG;
ImgMDigitalizar.MIO.Params [i]. TIFF_JPEGColorSpace: = ioJPEG_GRAYLEV;

However the image is not compressed. Please, what's wrong?
Go to Top of Page

fab

1310 Posts

Posted - May 28 2012 :  22:28:23  Show Profile  Reply
For a bug on current version you should set SamplesPerPixel=3. Setting ioJPEG_GRAYLEV anyway ignore SamplesPerPixel (assuming 1).
Go to Top of Page

izaque

Brazil
95 Posts

Posted - May 29 2012 :  05:25:52  Show Profile  Reply
Thank you Fabrizio, now is working fine!
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: