Re: [OpenMap Users] Creating direct color model images for OMRaster?

From: Wen Chang <Wen.Chang@drdc-rddc.gc.ca>
Date: Mon Jan 26 2004 - 17:04:18 EST

Hi! Don, I followed the first two steps and got the java.awt.Image, but
I am not so sure how com.bbn.openmap.image.BufferedImageHelper could
help me.

So I tried to use java.awt.image.PixelGrabber by setting x, y to 0,0;
and set width and height as getWidth() and getHeight() from Image Icon
and forceRGB to false, and then use com.bbn.openmap.ImageHelper to get
an int [] array.

But when I start openmap and adding the graphics to the map at run time,
it shows up java.lang.ClassCastException.

I wonder if I had do something wrong at any of those steps? Or does
anyone has other ways to create direct color model image

thanks

Wen

Don Dietrick wrote:
> I think you can do this through Java, creating an javax.swing.ImageIcon
> from a java.net.URL, and then getting the java.awt.Image from the
> ImageIcon.
>
> The com.bbn.openmap.image.BufferedImageHelper might do some stuff that
> would help, too.
>
> - Don
>
> On Jan 26, 2004, at 11:50 AM, Wen Chang wrote:
>
>> Hi! I got a gif image file, and I would like to get a direct color
>> model image from the gif file! But I am not so sure if there is any
>> tool or class in the openmap that could do the job. Does anyone have
>> the answer for that?
>>
>> thanks
>>
>> Wen
>>
>> --
>> [To unsubscribe to this list send an email to "majdart@bbn.com"
>> with the following text in the BODY of the message "unsubscribe
>> openmap-users"]
>>
>

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Mon Jan 26 17:06:55 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:37 EDT