如何对JPEG文件进行压缩,不改变图像的长度及宽度,只调整其压缩率.
压缩后,生成的文件在 1024K 以内,但最接近 1024K. (1024K只是一个例子,可以更小,比如:100K等,目的是让用户自己设定)目前100点,解决后另付300点.
压缩后,生成的文件在 1024K 以内,但最接近 1024K. (1024K只是一个例子,可以更小,比如:100K等,目的是让用户自己设定)目前100点,解决后另付300点.
来晚了, 给你贴两断help吧. hehe-----------------------------------------------------Delphi syntax:procedure Compress;C++ syntax:void __fastcall Compress(void);DescriptionCall Compress to compress for optimization, such as before streaming out when assigning a bitmap to a jpeg. Changing properties like CompressionQuality does not force compression. To force compression, call Compress.---------------------------------------------------------------------Indicates the trade-off ratio between the image quality and the file size.Delphi syntax:property CompressionQuality: TJPEGQualityRange;C++ syntax:__property TJPEGQualityRange CompressionQuality = {read=FQuality, write=FQuality, nodefault};DescriptionUse CompressionQuality to set the compression quality of the JPEG image when writing out a jpeg image. Higher compression results in a poorer picture quality, but a smaller file size. This property is not used for reading in files. TJPEGQualityRange is the type of the CompressionQuality property. The higher the TJPEGQualityRange value (up to a maximum of 100), the better the image quality, but the larger the file size. The lower the TJPEGQualityRange value (to a minimum of 1), the smaller the resulting file size, but at the expense of picture quality.
但最低也要25 否则失真太多请楼主自己看 <Visual C++ 实现MPEG/JPEG编解码技术> 一书里面有详细的源码 这里不帖了