X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libqscale.h;h=409a9bb7488366ddee5770bd38489eaddae48a2a;hb=285b119e49d181da10e41c0127ca3c324c786503;hp=bd5cbe30ef08d5b74496035c4204248162254c54;hpb=0e02c88a054b96cc8e2b3095e559979d0eba0817;p=qscale diff --git a/libqscale.h b/libqscale.h index bd5cbe3..409a9bb 100644 --- a/libqscale.h +++ b/libqscale.h @@ -8,6 +8,9 @@ typedef struct { /* True image size */ unsigned width, height; + /* 1 = B/W, 3 = YCbCr */ + unsigned num_components; + /* Component image sizes (possibly subsampled) */ unsigned w0, h0; unsigned w1, h1; @@ -24,10 +27,12 @@ typedef struct { enum qscale_scaling_filter { LANCZOS = 0, + MITCHELL = 1, }; enum qscale_jpeg_mode { SEQUENTIAL = 0, + PROGRESSIVE = 1, }; qscale_img *qscale_load_jpeg(const char *filename); @@ -35,6 +40,7 @@ qscale_img *qscale_load_jpeg_from_stdio(FILE *file); int qscale_save_jpeg(const qscale_img *img, const char *filename, unsigned jpeg_quality, enum qscale_jpeg_mode jpeg_mode); int qscale_save_jpeg_to_stdio(const qscale_img *img, FILE *file, unsigned jpeg_quality, enum qscale_jpeg_mode jpeg_mode); +qscale_img *qscale_clone(const qscale_img *img); qscale_img *qscale_scale(qscale_img *src, unsigned width, unsigned height, unsigned samp_h0, unsigned samp_v0, unsigned samp_h1, unsigned samp_v1, unsigned samp_h2, unsigned samp_v2, enum qscale_scaling_filter scaling_filter); void qscale_destroy(qscale_img *img);