Home > Back-end >  Java cycle compressed image to the specified size, but the file size does not change
Java cycle compressed image to the specified size, but the file size does not change

Time:05-06

 while (toFilePth length () & gt; The config. The SIZE) {
Thumbnails of (toFilePth). Scale (1 f). OutputQuality (0.6 f) outputFormat (" JPG "). ToFile (toFilePth);
}


As above, use Thumbnails library circulation compressed images, loop smaller file Size, for the first time, but after a second file Size no change, excuse me, may be what causes this? How to solve?
  • Related