i have a png file (1023X1448) ,it's 58.3 kb. when i did the operation below on windows, its size became 54.9kb, but on linux,after the same operation,i got a 157kb file.where is the problem?
Rectangle rect = new Rectangle(110, 150, 810, 1220);
ImageInfo info = new ImageInfo(filepath);
info.setDepth(2);
info.setQuality(100);
MagickImage image = new MagickImage(info);
MagickImage image1 = image.cropImage(rect);
image1.setFileName(name);
image1.scaleImage(640, 1220*640/810).writeImage(info);
thanks in advance!
png files convert on linux
Re: png files convert on linux
Try setting the image compression before you write the image. PDF supports a number of compression algorithms such as Zip and JPEG.
Re: png files convert on linux
i set both ZipCompression.it took no effect.
i am sure the scale operation brings the differences. i view them with photoshop ,the two image are different obviously.
how can i do?
i am sure the scale operation brings the differences. i view them with photoshop ,the two image are different obviously.
how can i do?