AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
October 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.10.22 21:12 "JPEGSetupEncode messages", by Jeffrey Ratcliffe
2008.10.22 23:16 "Re: JPEGSetupEncode messages", by Frank Warmerdam
2008.10.22 23:31 "Re: JPEGSetupEncode messages", by <lemoine.raphael@gmail.com>
2008.10.23 00:08 "Re: JPEGSetupEncode messages", by Frank Warmerdam
2008.10.23 13:44 "Re: JPEGSetupEncode messages", by Bob Friesenhahn
2008.10.23 10:56 "Re: JPEGSetupEncode messages", by Gerben Vos
2008.10.23 19:56 "Re: JPEGSetupEncode messages", by Jeffrey Ratcliffe
2008.10.23 20:12 "Re: JPEGSetupEncode messages", by Bob Friesenhahn

2008.10.23 13:44 "Re: JPEGSetupEncode messages", by Bob Friesenhahn

On Wed, 22 Oct 2008, Frank Warmerdam wrote:
>> 
>> JPEGSetupEncode: RowsPerStrip must be multiple of 8 for JPEG
>
> I would suggest selecting a RowsPerStrip value that is a multiple
> of 8.

This is the logic I am using in GraphicsMagick:

         case COMPRESSION_JPEG:
           {
             /*
               RowsPerStrip must be multiple of 8 for JPEG.
             */
             rows_per_strip=rows_per_strip+(8-(rows_per_strip % 8));
             (void) TIFFSetField(tiff,TIFFTAG_JPEGQUALITY,image_info->quality);
             if (IsRGBColorspace(image->colorspace))
               (void) TIFFSetField(tiff,TIFFTAG_JPEGCOLORMODE,JPEGCOLORMODE_RGB);
             if (bits_per_sample == 12)
               (void) TIFFSetField(tiff,TIFFTAG_JPEGTABLESMODE,JPEGTABLESMODE_QUANT);
             break;
           }

Bob
======================================
Bob Friesenhahn
bfriesen@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/