Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] export map to image bug

> doesn't have any alpha data currently in it.  And I'm pretty any image
> exported from uDig has no alpha data in it since there is no alpha data to
> write (the image is just a composite rendered by the uDig map renderer, does
> it ever render in any true alpha transparencies?  I was under the impression
> it took transparencies into account when rendering, but the resulting
> composite was always just a regular non-alpha image).

Feature fill and so on is rendered with transparency (depending on
opacity). So each individual layer has alpha; when those are drawn
into a single buffered image those settings are used; but I am not
sure if thealpha is preserved or not.

However when printing; or exporting an image - a single Graphics
should be used; allowing you to capture the alpha if you like.

> I did look at the ImageIO library to try and find a way to determine what
> formats support alpha with the writers and readers, but I couldn't without
> first providing it an image (which would already have to be built with alpha
> or no alpha).  So that put me back at square one.  I will make sure the map
> renderer is properly setting the background color.  What is the "non-native"
> jpeg writer you are referring to?

Have  alook at the export image code; possible on 1.1.1 (not sure if
it made it to trunk) where a lot of last minuet hacks were added to
filter out the native image formats.

Basically PNG native was busted; so we needed to be sure not to let
the user choose that one when they choose their export format. We
generate a list of all the supported export format; and carefully
ignore a couple of them that we are sure are broken.

Jody


Back to the top