About maskComponentColorModelByte again...
I think I'm begining to understand how the method tries to process. If I'm
understanding right, it basically uses a lookup for replacing every occurences
of the "color to turn into a transparent color" to RGB value of (0,0,0), which
is black. Then it uses a "band combine" followed by "binarize" followed by "band
select" in order to get the alpha chanel, to be merged again with the RGB image.
Problems that I see:
* If the original RGB image has black color (0,0,0), they will be turned into
transparent color as well as a side-effect of current algorithm if I'm
understanding right?
* This is a lot of image operations!!!!!!!!!!
"BandSelect" --> "Lookup" --> "BandCombine" --> "Extrema" --> "Binarize" -->
"Format" --> "BandSelect" (one more time) --> "Multiply" --> "BandMerge"
Up to 9 image operations (with all the potentially huge rasters to copy that
amount of time in memory) for turning an opaque color into a transparent one!!
We would get waaaaaaaaaaaaaaaaaaaayyyyy much more speed and memory efficiency
by writting our own JAI operation if there is none suitable. It would also be
more determinist (the "binarize" method invoked above depends on statistics on
pixel values) and avoid unwanted side-effect like turning black color to
transparent one. It would also be easier to maintain I believe.
I will leave the current method as is, but we should consider seriously
replacing it by a custom JAI operation. Or is it really used? If not, it may be
safer to remove it...
Martin
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel