PMXBOT Log file Viewer

Help | Karma | Search:

#pil logs for Sunday the 5th of October, 2014

(Back to #pil overview) (Back to channel listing) (Animate logs)
[19:48:42] <tallioni> hi. i am searching the docs up and down how to use PIL to increase the contrast of an image. The Contrast-Enhancer only allows to decrease contrast (for reasons i don't know)
[19:53:44] <MathFox> what did you try?
[20:13:26] <tallioni> well, as values lower than 1 decrease contrast, i tried values from -1 to 2, which of course didnt work
[20:15:13] <tdsmith> stop me if this is a dumb question but did you try fractional values like 0.5?
[20:16:54] <tallioni> yup
[20:18:24] <tdsmith> oh that was kind of a dumb question, sorry
[20:18:30] <tallioni> from the docs: "This class can be used to control the contrast of an image, similar to the contrast control on a TV set. An enhancement factor of 0.0 gives a solid grey image. A factor of 1.0 gives the original image."
[20:18:46] <tallioni> see, no contrast up.
[20:19:19] <tallioni> same with brightness. i mean WTF? why doesn't let me PIL make my image brighter?
[20:19:56] <tdsmith> what happens with large values like, i don't know, 10?
[20:20:07] <tallioni> nothing
[20:27:02] <MathFox> please shoe me the original image and the image after a 1.5 contrast enhancement,
[20:27:18] <MathFox> AND THE CODE YOU USED
[20:33:53] <tdsmith> works for me http://nbviewer.ipython.org/gist/tdsmith/6421baf37f0d7049db69
[20:50:07] <tallioni> arrrgh
[20:50:59] <tallioni> one should probably use the return value of the enhance method instead of silently assumming that it works by side effect
[22:37:40] <havingFun> hello
[22:47:35] <MathFox> aye!