Python imaging alternatives

后端 未结 9 1214
渐次进展
渐次进展 2021-01-31 12:31

I have python code that needs to do just a couple simple things to photographs: crop, resize, and overlay a watermark. I\'ve used PIL, and the resample/resize results are TERRIB

9条回答
  •  一生所求
    2021-01-31 12:44

    I've used PIL, and the resample/resize results are TERRIBLE.

    They shouldn't be, as long as you:

    1. use only Image.ANTIALIAS filtering for downscaling operations
    2. use only Image.BICUBIC filtering for upscaling operations.
    3. remember to convert to 'RGB' colour mode before the resize if you are using a paletted image
    4. don't use .thumbnail(). it's crap
    5. set the quality= level to something appropriate when saving JPEGs (the default is quite low)

提交回复
热议问题