PNGs and screenGamma

Richmond Mathewson richmondmathewson at gmail.com
Sat Jul 2 09:17:11 EDT 2011


Interestingly enough . . . my Pentium 4 running Ubuntu 11.04 has a
screen gamma of 2.2 . . .

So, I can only conclude, that while Apple's bye-line may be "Think 
Different",
as Lion begins to look like something halfway between GNOME 3 and UNITY,
and Snow Leopard sets a screen gamma to 2.2, the real thinking is not so
much "different" as conformist.

On 07/02/2011 01:33 AM, Devin Asay wrote:
> Hi all,
>
> About a year and a half ago Scott Rossi posted this useful tip:
>
>> This might be useful for folks delivering image-heavy apps on Mac OS X 10.6
>> and later...
>>
>> Apparently with Snow Leopard, Apple has changed the default gamma of the
>> system to 2.2 (used to be 1.8).
>>
>> <http://blogs.adobe.com/jnack/2009/09/why_your_web_content_will_look_darker.
>> html>
>>
>> I was recently throwing some PNG images on a card on Rev that looked
>> significantly darker than where they were created (in Photoshop), and for
>> the life of me could not figure out why.  I'm still searching for a reliable
>> way to strip the gamma information from PNG images, but after finding the
>> above article, I tried changing the screenGamma in Rev to 2.2 and amazingly
>> (or maybe expectedly) the image seems to display properly.
>>
>> set the screenGamma to 2.2

I have just set up a merry little stack that can set the screen gamma 
from 2.2
to 1.8 and back again [rocket science it ain't]. It sports 4 open source PNG
images; now, reading this posting I would expect the appearance of those 
PNGs
to change a spot when I set the screenGamma; but they don't seem to [at 
least
on Linux]: LC 4.5.

Download it and play with it:

http://andregarzia.on-rev.com/richmond/STUFF/gamma.rev

My PPC macMini returns a screen gamma of 1.7 (mainly because I've been 
bu**ering around with the Mac to suit my needs); agin, setting the SG to 2.2
results in nothing: LC 4.5.

Ar-har-har!  When I open the same stack under LC/RR 4.0, having, 
supposedly, set the SG to 2.2 when it was open in LC 4.5 it reports the 
SG as 1.7. So the screen gamma Dinge-an-sich is NOT reset.

Doing the "put the image into itself" THANG [click on button 'THANG'] 
crashes
4.0 (Mac PPC), on 4.5 (Mac PPC) one of the images vanishes, and on Linux 
all the
images vanish.

Joy, joy, oh, complete, unmitigated joy . . .  :(
>> I need to do some more testing, but it appears that when delivering apps on
>> Snow Leopard that make heavy use of PNGs, one will need to do something to
>> the effect of:
>>
>> if "mac" is in platform() and systemVersion()>  10.5 then ...
>>
>> Also used the following method to force refresh the display of the image:
>>
>> set text of img 1 to text of img 1
>>
>> Hope this saves some head banging for other folks using images.
>>
>> Regards,
>>
>> Scott Rossi
>> Creative Director
>> Tactile Media, UX Design
> Just now, I've run into this exact same problem. I tried applying Scott's workaround, only to discover that it only works with Revolution 4.0 and earlier. Any time I try to display these same PNGs in LiveCode 4.5 or higher they come out significantly darker, regardless of whether I reset the screenGamma. Oddly, PNGs that were originally produced in OS X 10.5 do not come out darker, so it definitely has something to do with 10.6. Only the latest versions of LC don't allow me to correct the problem any more.
>
> Has anyone run into this, and has anyone found a solution?
>
> Regards,
>
> Devin
>
>
>
> Devin Asay
> Humanities Technology and Research Support Center
> Brigham Young University
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list