[mapserver-users] Force Mapserver into rendering 8bpp png images(instead of 4bpp)?
Rahkonen Jukka
Jukka.Rahkonen at mmmtike.fi
Fri Apr 29 08:05:24 PDT 2011
Hi,
Probably through some tuned OUTPUTFORMAT and perhaps by having QUANTIZE_COLORS=256. Maybe this can lead your closer to the goal
http://trac.osgeo.org/mapserver/ticket/2436
-Jukka Rahkonen-
-----Alkuperäinen viesti-----
Lähettäjä: mapserver-users-bounces at lists.osgeo.org puolesta: christian yrrman
Lähetetty: pe 29.4.2011 16:18
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] Force Mapserver into rendering 8bpp png images(instead of 4bpp)?
Dear All,
former subject of this thread was "Re: NoDATA value, transparency for
paletted IMG file" -
I'm having difficulties displaying 4bit-per-pixel PNG images served
via WMS to a GoogleEarth-API-Application (the NoData-Values aren't
transparent but "shaded black", whereas this worls well for 8bpp PNG
images- so I assume the GE-API can't display transparency for 4bpp
PNGs.
Is there a way to force mapserver into the creation of 8bpp PNG files,
even if the corresponding color table only has 9 entries (I think
that's the reason for this)?
Thanks for your help and greetings!
Chris
On Thu, Apr 28, 2011 at 12:42 PM, ChrisFern [via OSGeo.org]
<ml-node+6312790-588073264-302786 at n2.nabble.com> wrote:
> Dear Frank, dear all,
>
> thanks for your reply.
> I think I have narrowed down the problem and it isn't really a mapserver
> issue - the 8bit paletted img gets rendered to a 4bit-per-pixel png whereas
> the correctly transparent RGB img gets rendered to an 8bit-per-pixel png.
> Seems that the Google Earth API can't detect/deal with the NoData value in
> this 4bpp png and renders this value sort of "shaded black" (which I would
> like to get ridd of). GIMP for example can deal with the transparency in
> this 4bpp png.
>
> If I switch to RGBA in the output format, then I have the transparency
> however the image is much bigger:
>
> OUTPUTFORMAT
> NAME png
> DRIVER "GD/PNG"
> MIMETYPE "image/png"
> # IMAGEMODE RGBA
> IMAGEMODE PC256
> EXTENSION "png"
> TRANSPARENT ON
> FORMATOPTION "transparent=on"
> END
>
> Is there a way I can force the mapserver to produce 8bpp pngs?
>
>
> THANKS for your help - highly appreciated - and greetings,
>
>
>
> Chris
>
> PS here's the gdalinfo output for the 4bpp png:
> Driver: PNG/Portable Network Graphics
> Files: lb_usa.png
> Size is 1024, 768
> Coordinate System is `'
> Corner Coordinates:
> Upper Left ( 0.0, 0.0)
> Lower Left ( 0.0, 768.0)
> Upper Right ( 1024.0, 0.0)
> Lower Right ( 1024.0, 768.0)
> Center ( 512.0, 384.0)
> Band 1 Block=1024x1 Type=Byte, ColorInterp=Palette
> NoData Value=0
> Image Structure Metadata:
> NBITS=4
> Color Table (RGB with 9 entries)
> 0: 1,1,1,0
> 1: 0,0,0,255
> 2: 12,16,120,255
> 3: 31,62,140,255
> 4: 33,110,158,255
> 5: 42,156,154,255
> 6: 61,184,104,255
> 7: 59,214,45,255
> 8: 113,235,47,255
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://osgeo-org.1803224.n2.nabble.com/NoDATA-value-transparency-for-paletted-IMG-file-tp6305135p6312790.html
> To unsubscribe from NoDATA value, transparency for paletted IMG file, click
> here.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list