Ciao Pete, good to know, I guess we need to add some more error checks inside that method.
Simone. On Thu, Mar 26, 2009 at 12:07 PM, Pete Ballack <[email protected]> wrote: > Hi Simone, > > I tried your suggestion, but at first I had an > IllegalArgumentException: "The specified ColorModel is incompatible > with the image SampleModel." > > after a little try and error I came up with following solution. > > ImageWorker imageWorker = new ImageWorker( image ); > imageWorker = imageWorker.rescaleToBytes(); > imageWorker.makeColorTransparent( Color.BLACK); > image = imageWorker.getRenderedImage(); > > rescaleToBytes was necessary because my WritableRaster is of type float. > > thanks! > > > > > On Thu, Mar 26, 2009 at 12:48 AM, Simone Giannecchini > <[email protected]> wrote: >> Ciao Pete, >> you can try to use the makeColorTransparentMethod on a renderedImage >> obtained from a coverage and then wrap the result as a coverage again. >> >> Simone. >> >> ------------------------------------------------------- >> Ing. Simone Giannecchini >> GeoSolutions S.A.S. >> Owner - Software Engineer >> Via Carignoni 51 >> 55041 Camaiore (LU) >> Italy >> >> phone: +39 0584983027 >> fax: +39 0584983027 >> mob: +39 333 8128928 >> >> >> http://www.geo-solutions.it >> http://simboss.blogspot.com/ >> http://www.linkedin.com/in/simonegiannecchini >> >> ------------------------------------------------------- >> >> >> >> On Mon, Mar 23, 2009 at 10:33 AM, Pete Ballack >> <[email protected]> wrote: >>> Hi Simone, >>> >>> thats correct. >>> >>> I'll take a look at the ImageWorker class, but any help is appreciated. >>> >>> Thanks >>> >>> On Mon, Mar 23, 2009 at 1:35 AM, Simone Giannecchini >>> <[email protected]> wrote: >>>> Dear Pete, >>>> If I understood correctly your statements, you need to make exactly >>>> one color transparent, right? >>>> If my undertanding is correct I'll try to guide you through using the >>>> ImageWorker class. >>>> >>>> Simone. >>>> ------------------------------------------------------- >>>> Ing. Simone Giannecchini >>>> GeoSolutions S.A.S. >>>> Owner - Software Engineer >>>> Via Carignoni 51 >>>> 55041 Camaiore (LU) >>>> Italy >>>> >>>> phone: +39 0584983027 >>>> fax: +39 0584983027 >>>> mob: +39 333 8128928 >>>> >>>> >>>> http://www.geo-solutions.it >>>> http://simboss.blogspot.com/ >>>> http://www.linkedin.com/in/simonegiannecchini >>>> >>>> ------------------------------------------------------- >>>> >>>> >>>> >>>> On Sat, Mar 21, 2009 at 3:56 PM, Pete Ballack >>>> <[email protected]> wrote: >>>>> Hi everybody, >>>>> >>>>> I have an Gridcoverage (grayscale) and I'm am displaying it over some >>>>> other images. I successfully applied an alpha, but it covers more than >>>>> just one value. What i need is too hide just one specific color index. >>>>> >>>>> Example: >>>>> My grayscale image has values from [0,255] and when i display it I >>>>> only want values from [1,255] to be shown. >>>>> >>>>> >>>>> Does anybody have an idea how to accomplish that task? >>>>> >>>>> Thanks >>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >>>>> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >>>>> easily build your RIAs with Flex Builder, the Eclipse(TM)based development >>>>> software that enables intelligent coding and step-through debugging. >>>>> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >>>>> _______________________________________________ >>>>> Geotools-gt2-users mailing list >>>>> [email protected] >>>>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >>>>> >>>> >>> >>> ------------------------------------------------------------------------------ >>> Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are >>> powering Web 2.0 with engaging, cross-platform capabilities. Quickly and >>> easily build your RIAs with Flex Builder, the Eclipse(TM)based development >>> software that enables intelligent coding and step-through debugging. >>> Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com >>> _______________________________________________ >>> Geotools-gt2-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users >>> >> > > -- ------------------------------------------------------- Ing. Simone Giannecchini GeoSolutions S.A.S. Owner - Software Engineer Via Carignoni 51 55041 Camaiore (LU) Italy phone: +39 0584983027 fax: +39 0584983027 mob: +39 333 8128928 http://www.geo-solutions.it http://simboss.blogspot.com/ http://www.linkedin.com/in/simonegiannecchini ------------------------------------------------------- ------------------------------------------------------------------------------ _______________________________________________ Geotools-gt2-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
