images in cross-platform stacks
Thomas McGrath III
3mcgrath at adelphia.net
Wed May 17 07:58:56 EDT 2006
Concerning PNGs and Gamma,
This behavior of PNGs also occurs when using PNGs in a PocketPC
device. In recent development I had PNGs with transparency "self"
adjusting by as much as 15 points. I started out with pure white
255,255,255 for transparency and an off white 250,250,250 for non
transparent white and in the PocketPC device the 250,250,250 was
turning transparent. I had to adjust the off white down to
240,240,240 before it would no longer turn transparent. This was not
the case on the MAC or PC.
The gamma on PocketPC is different than on Windows which is different
than on Mac. The other thing too is that the PocketPC display screen
is not 72-dpi but actually much higher. The device I am using is 192-
dpi. quote MSDN "Windows Mobile™-based devices have traditionally
used 96-dpi displays, but Windows Mobile 2003 Second Edition-based
devices can run at higher resolutions."
------ It seems the otherwise-industry-standard is not the same
across the industry for gamma or screen definition.
GAMMA problem: http://hsivonen.iki.fi/png-gamma/
"In order to compensate for the different gammas, the display gamma
of the system an image was authored on and the display gamma of the
system where the image is being displayed both need to be known to
the piece of software displaying the image. The PNG format provides a
means for storing the (reciprocal of) display gamma of the authoring
system to the image file. It is up to the program writing the file to
store the native display gamma of the image, and then it is up to
program displaying the file to compensate.
The new problem is that the programs that read and write PNG files
usually have no idea about the display gamma of the system they are
running on. The usual method is to take a guess based on the platform
the program is running on and pick one of the default values
mentioned for Mac, SGI, NeXT and PC clones in the Gamma Tutorial
appendix of the PNG specification. http://www.w3.org/TR/PNG/
This approach is bogus. The platform defaults are only that:
defaults. The display gamma is configurable on many systems. Also, on
uncalibrated systems the default values are not exact. Writing bogus
gamma information to files and then doing gamma “correction” using
different bogus gamma information is not solving the problem—only
perturbing it further.
In practice, a rather arbitrary gamma change is often applied to a
PNG image when the image is opened in a program that did not write
the file. When a PNG image is viewed in isolation, the gamma
disturbance may not be obvious. However, when the colors of an image
are meant to match some surrounding colors—such as the colors of a
Web page—the problem becomes more serious."
GAMMA is different across platforms, devices, and users screens and
is treated differently by the application that created the PNG and
the application that reads the PNG. We are actually fortunate that we
can set this for use in REV based on the w3 guidelines BUT as you can
see it is only a best guess.
HTH
Tom
On May 17, 2006, at 2:05 AM, Richard Gaskin wrote:
>
> Tereza Snyder wrote:
>
>> On May 16, 2006, at 10:47 PM, Richard Gaskin wrote:
>>> Rev doesn't alter the display of JPEGs or GIFs -- why single out
>>> PNGs in this way, and why try to adjust for screen gamma when
>>> the screen is already doing anything that needs to be done there?
>> and Mark Talluto wrote:
>>> This is a question that goes way back to the good Dr. Raney. I
>>> remember having a discussion with him about it. The details are
>>> fuzzy, but they went something like this: That is the way it is.
>> I seem to remember something too in the dim past. PNGs, I know,
>> contain gamma info in their headers in contrast to JPEGs, which
>> may not. The info is used by rev to display consistent gamma
>> cross-platform.
>> In the present, I take advantage of it because it shows, on the
>> Mac, the gamma I can expect in Windows. My applications are wall-
>> to-wall images. I use FireWorks to make most of my images and set
>> it to display Windows gamma. I achieve better control over
>> contrast because I see what (most of) the end users will get.
>> It's on purpose!
>
> Fireworks, eh? One more thing I like about you. :)
>
> It never occured to me that PNGs would try to compensate for
> differences in gamma. I guess I'm just one of those old fashioned
> guys who thinks that if a person wants a different gamma they can
> just change it for everything, rather than have some elements not
> match others.
>
> Why doesn't Mac use the otherwise-industry-standard gamma?
>
> Or perhaps more appropriately now that we're in a world where Apple
> ships with two-button functionality and runs on Intel, WHEN will
> Apple change their default gamma?
>
> I went out on a limb several years ago and predicted the shift to
> Intel and two-button mice for Apple; I'll put myself out there
> again and suggest that Apple may adopt the rest of the world's
> default gamma within 24 months.
>
> --
> Richard Gaskin
> Fourth World Media Corporation
Thomas J McGrath III
3mcgrath at adelphia.net
Lazy River Software - http://www.lazyriversoftware.com
Lazy River Metal Art™ - http://www.lazyriversoftware.com/metal.html
Meeting Wear - http://www.cafepress.com/meetingwear
Semantic Compaction Systems - http://www.minspeak.com
SCIconics, LLC - http://www.sciconics.com/sciindex.html
More information about the use-livecode
mailing list