by Risen » Mon Oct 15, 2007 1:43 pm
HotWax wrote:First, how does ZDoom know that you're using a grayscale graphic?
Read the appropriate PNG chunk, of course. IIRC, A palette isn't stored with grayscale images at all.
Spoiler: more info on that
HotWax wrote:How does the color property help clarify this?
The 'color' property defines what color the decal should be drawn in. An alpha-map must have a color defined, so leaving that property blank could default to drawing the decal as a grayscale image, in case that may have been the intended effect.
[quote="HotWax"]First, how does ZDoom know that you're using a grayscale graphic?[/quote]
Read the appropriate PNG chunk, of course. IIRC, A palette isn't stored with grayscale images at all.
[spoiler="more info on that"]From: http://java.sun.com/j2se/1.4.2/docs/api/javax/imageio/metadata/doc-files/png_metadata.html
[code]A PLTE chunk may not appear in a Gray or GrayAlpha image[/code]
[code]<!ATTLIST "IHDR" "colorType" ("Grayscale" | "RGB" | "Palette" |
"GrayAlpha" | "RGBAlpha") #REQUIRED>[/code][/spoiler]
[quote="HotWax"]How does the color property help clarify this?[/quote]
The 'color' property defines what color the decal should be drawn in. An alpha-map must have a color defined, so leaving that property blank could default to drawing the decal as a grayscale image, in case that may have been the intended effect.