Python imaging alternatives

后端 未结 9 1379
渐次进展
渐次进展 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条回答
  •  萌比男神i
    2021-01-31 13:04

    Last time I compared, this downscaler's output is almost identical to that of GIMP's "cubic" option:

     import Image
    
     def stretch(im, size, filter=Image.NEAREST):
         im.load()
         im = im._new(im.im.stretch(size, filter))
         return im
    

    IIRC, the differences are visually indistinguishable -- some pixel values +/-1 due to rounding, and they tend to be round the edges. It's not slow either.

    cf: http://www.mail-archive.com/image-sig@python.org/msg00248.html

提交回复
热议问题