-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Technically speaking, the problem is that "the computations are performed as if the scale of brightnesses was linear while in fact it is a power scale." In mathematical terms: "a gamma of 1.0 is assumed while it is 2.2." Lots of filters, plug-ins and scripts make the same error.
Pillow seems to be affected by that problem too as the following test script demonstrates:
from PIL import Image
from cStringIO import StringIO
from urllib2 import urlopen
f = urlopen('http://www.4p8.com/eric.brasseur/gamma_dalai_lama_gray.jpg')
img = Image.open(StringIO(f.read()))
img.show()
newsize = tuple([i/2 for i in img.size])
imgscaled = img.resize(newsize, Image.ANTIALIAS)
imgscaled.show()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels