libjpeg turbo - Scaling using libjpegturbo in java -
i have image want re-scale size file size small. using libjpegturbo class tjscalingfactor
, tjcompressor
, still unable re-scale image there no method allow height , width inputted.
this problem seems somehow related this question, op wants compress, decompress , compress image scale it. this question talking scaling while decompressing, can in fact done turbojpeg api.
this part contains background information
in fact, scaling while compressing introduced , implemented in version 7 of independent jpeg groups libjpeg. developer of turbojpeg , libjpeg-turbo has doubts usefulness of new function, why not see reason implement it. also, project page says: "it can optionally configured api/abi-compatible libjpeg v7 , v8, not include support non-standard smartscale format introduced in libjpeg v8."
tl;dr;
use tjcompressor
compress image, decompress wished width/height using tjdecompressor
, compress again using tjcompressor
.
Comments
Post a Comment