add __mg_save_jpg function for storing MYBITMAP as JPEG file.
Created by: 10km
enable application to store image as JPEG file.
description: Convert all color space(RGBA
,BGR
,RGB565
,index color256,16) to RGB
,and compress JPEG with JCS_RGB
color space.
Can use preprocessor _MGIMAGE_JPG_SAVE_QUALITY
to define JPEG compression quality.default value 90.
For RGBA
color space image ,can use _MGIMAGE_JPG_RGBA_BGCOLOR
define background color,default value 0XFFFFFF (white).
For image with index color space(256 or 16) ,the argument 'pal' of __mg_save_jpg
must not be NULL.
LIMIT:type of MG_RWops
object must be RWAREA_TYPE_STDIO
( a file).not support RWAREA_TYPE_MEM
.
RGB,BGR,RGBA,RGB565,index color (256,16) TEST PASS.