Skip to main content

[JAI-IMAGEIO] Changing pixels in a RenderedImage

3 replies [Last post]
aryland
Offline
Joined: 2006-04-22

I have a RenderedImage that uses an IndexColorModel (its a gif) and I need to change the color of all the pixels that use a certain color (based on the index). Any hints on how to do this?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Brian Burkhalter

If you want to change the color to which a given index is mapped, you should
be able to create a new IndexColorModel containing the desired mapping and
then use the "Format" operation to swap the ColorModels.

Is that what you were asking?

Brian

On Tue, 16 May 2006, jai-imageio@javadesktop.org wrote:

> I have a RenderedImage that uses an IndexColorModel (its a gif) and I need to change the color of all the pixels that use a certain color (based on the index). Any hints on how to do this?
> [Message sent by forum member 'aryland' (aryland)]

----------------
Brian Burkhalter
Java Media, Imaging, and Graphics
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net

stanaccy
Offline
Joined: 2005-03-30

To what "Format" operation are you refering here?

Brian Burkhalter

JAI defines a "Format" operation in javax.media.jai.operator.Format.

Brian

On Thu, 10 Aug 2006, jai-imageio@javadesktop.org wrote:

> To what "Format" operation are you refering here?
> [Message sent by forum member 'stanaccy' (stanaccy)]
>
> http://forums.java.net/jive/thread.jspa?messageID=141848

----------------
Brian Burkhalter
Java Media, Imaging, and Graphics
Sun Microsystems, Inc.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This email message is for the sole use of the intended recipient(s)
and may contain confidential and privileged information. Any
unauthorized review, use, disclosure or distribution is prohibited.
If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@jai-imageio.dev.java.net
For additional commands, e-mail: interest-help@jai-imageio.dev.java.net