0

I wanted to compress an image as much as possible and also without lossing much of an information(clarity) after resizing or croping a original image using GOmagick. Currently I am using setimagequality(q). Can anyone suggest the best way?

fmw42
  • 46,825
  • 10
  • 62
  • 80
Sainath
  • 45
  • 4
  • It is very subjective, and depends on the image content, the image format, the original quality, the intended usage and the eye and sensibilities of the person looking at it. – Mark Setchell Jun 14 '18 at 20:22
  • You need to specify what your desired output file format will be? JPG, PNG, TIFF? The format will also determine how you can compress the image. – fmw42 Jun 14 '18 at 20:22
  • The format will be jpg and png and the original quality will be high – Sainath Jun 14 '18 at 20:31
  • Output to JPG and PNG use different values for the quality values. See http://www.imagemagick.org/script/command-line-options.php#quality. As Mark Setchell said, visual quality is subjective and depends upon image content. So there is no universal best value for quality. If you do not want to lose quality, then do not save to JPG, since it is a lossy compression. Use PNG or TIFF (with lzw compression) as neither are lossy. Test to see which gives the smallest file size for your image type. – fmw42 Jun 14 '18 at 22:05

0 Answers0