V4MD: Save images compressed (like png) incl. alpha

Kirill Pekarov kirill_pekarov at valentina-db.com
Sat Mar 14 08:11:38 CDT 2009


>>> find anything about setting compression methods in valentina for saving
>>> pictures in tiff-format..?
>>>       
>> 1) As I remember we have integrate TIFF compression few years ago.
>> But rare used.
>>
>> You can try kTIFF instead of kJPG
>>
>> Kirill?
>>     
>
> So you cannot set the compression explicitly?
> Maybe I'm overlooking something about that in the docs...
> If the 'deflate' compression method would be available,
> the lossless compression would be as strong as in png.
> If only RLE or LZW compression is used, the saved data would 
> be quite huge compared to DEFLATE.
>
> If you cannot already do this with valentina, here's my feature request! :)
>   
Done. Here list of compression methods:

#define        COMPRESSION_NONE                     1    /* dump mode */
#define        COMPRESSION_CCITTRLE              2    /* CCITT modified 
Huffman RLE */
#define        COMPRESSION_CCITTFAX3           3    /* CCITT Group 3 fax 
encoding */
#define     COMPRESSION_CCITT_T4                  3       /* CCITT T.4 
(TIFF 6 name) */
#define        COMPRESSION_CCITTFAX4           4    /* CCITT Group 4 fax 
encoding */
#define     COMPRESSION_CCITT_T6                  4       /* CCITT T.6 
(TIFF 6 name) */
#define        COMPRESSION_LZW                        5       /* 
Lempel-Ziv  & Welch */
#define        COMPRESSION_OJPEG                     6    /* !6.0 JPEG */
#define        COMPRESSION_JPEG                        7    /* %JPEG DCT 
compression */
#define        COMPRESSION_NEXT                       32766    /* NeXT 
2-bit RLE */
#define        COMPRESSION_CCITTRLEW           32771    /* #1 w/ word 
alignment */
#define        COMPRESSION_PACKBITS              32773    /* Macintosh 
RLE */
#define        COMPRESSION_THUNDERSCAN    32809    /* ThunderScan RLE */
/* codes 32895-32898 are reserved for ANSI IT8 TIFF/IT <dkelly at apago.com) */
#define        COMPRESSION_IT8CTPAD    32895   /* IT8 CT w/padding */
#define        COMPRESSION_IT8LW           32896   /* IT8 Linework RLE */
#define        COMPRESSION_IT8MP           32897   /* IT8 Monochrome 
picture */
#define        COMPRESSION_IT8BL            32898   /* IT8 Binary line 
art */
/* compression codes 32908-32911 are reserved for Pixar */
#define     COMPRESSION_PIXARFILM        32908   /* Pixar companded 
10bit LZW */
#define        COMPRESSION_PIXARLOG      32909   /* Pixar companded 
11bit ZIP */
#define        COMPRESSION_DEFLATE         32946    /* Deflate 
compression */
#define     COMPRESSION_ADOBE_DEFLATE   8       /* Deflate compression, 
as recognized by Adobe */
/* compression code 32947 is reserved for Oceana Matrix <dev at oceana.com> */
#define     COMPRESSION_DCS             32947   /* Kodak DCS encoding */
#define        COMPRESSION_JBIG          34661    /* ISO JBIG */
#define     COMPRESSION_SGILOG       34676    /* SGI Log Luminance RLE */
#define     COMPRESSION_SGILOG24   34677    /* SGI Log 24-bit packed */
#define     COMPRESSION_JP2000         34712   /* Leadtools JPEG2000 */

Example:

fld_picture.setImage( image, #kTIFF, 32946  ) // Will save image in TIFF 
format with DEFLATE compression.

Please wait next build.


-- 
Best regards,

Kirill Pekarov
Software Engineer Associate
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list