matthewwithanm / django-imagekit

Automated image processing for Django. Currently v4.0
http://django-imagekit.rtfd.org/
BSD 3-Clause "New" or "Revised" License
2.27k stars 275 forks source link

请问,1 如何让生成的图片大小在200kb 以内。 2如何让图片等比列缩放 #533

Closed 18518278831 closed 1 year ago

18518278831 commented 3 years ago

请问, 1 如何让生成的图片大小在200kb 以内。 2如何让图片等比列缩放

vstoykov commented 1 year ago

Automatic translation from Google Translate

Excuse me,

  1. How to make the generated picture size within 200kb?
  2. How to make the picture proportionally zoom?

My answers to these questions are:

  1. Currently the final image can be restricted only by visual size in pixels and not by actual file size. Some experiment can be made with different input images and different size of the thumbnail to measure the file size and eventually pick the right size for you.
  2. You can try the pilkit.processors.ResizeToFit