CRasterImage::SetCompressQuality![]()
void SetCompressQuality( int CompressionQuality );
Parameters
| CompressionQuality | Compression quality factor. Value from 0 to 100. The higher the factor is the higher is quality of image being compressed. However the higher image quality means that byte size of compressed image (what can mean file size) is also higher. The relationship between compression quality factor and byte size of image is not linear and vary from image to image. Default compression quality factor value is set during CRasterImage object initialization to 80 |
Following table shows an example of various compression quality factor settings and resulting JPEG file size.
| Original BMP file size: | 318 438 Bytes |
| Compression Quality | JPEG file size |
| -1 | 3 047 Bytes | |
| 10 | 5 856 Bytes | |
| 20 | 9 015 Bytes | |
| 30 | 10 662 Bytes | |
| 40 | 15 071 Bytes | |
| 50 | 17 702 Bytes | |
| 60 | 18 984 Bytes | |
| 70 | 20 152 Bytes | |
| 80 | 24 620 Bytes | |
| 90 | 30 997 Bytes | |
| 100 | 85 353 Bytes |
Remarks
Compression quality factor affects compression of JPEG images only. It does not affect other image format types such as GIF.
This method is available from ClassGL version 3.1
See Also
![]()
| © 2001 Solid Graphics, All rights reserved. |
| To view this site, we require use of either Netscape Navigator 4.0 or higher or Internet Explorer 4.0 or higher. |