2
我試着去使用PythonMagick一個jpg圖像創建縮略圖:設置採樣算法中
img.quality(90)
# TODO set the sampling algo e.g. bilinear
img.sample(Geometry(scaledWid, scaledHei))
img.crop(Geometry(THUMBNAIL_WID-1, THUMBNAIL_HEI-1,cropLeft, cropTop))
img.write(destFilePath)
如何設置採樣算法中使用?我相信現在它正在使用最近的鄰居,看起來很醜陋。