Skip to main content

[JAVA2D] FW: Trouble with colorfiltering with LookupOp

2 replies [Last post]
Anonymous

Hi, I'm still having trouble with LookupOp on various platforms.

I've put together a stand-alone program that demonstrates the
problem.

On windows, everything works great. When I try to enhance the
red channel on an image, only the red channel changes.

On Linux, changing the red channel actually changes green,
green changes blue, and blue doesn't have any effect.

Here's my test app (with screenshots):
http://neuroinformatica.com:8080/colorFiltering.zip

and a screenshot of what happens on linux:
http://neuroinformatica.com:8080/linux_wrong.png

it should look like:
http://neuroinformatica.com:8080/windows_correct.png

I need to work around this problem... can anyone
offer any advise?

Thanks,
-Jim

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Reply viewing options

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

First it looks to me like green affects red, not blue. Given
that, then this looks like a byte endian issue. For integer
data types:

XRGB bigendian
BGRX smallendian

G and R would get confused and B would get confused with an unused
channel. We're tracking down a few byte endian mistakes in some
of our native code to manipulate images right now.

Which platforms are you using?

Windows (which version) on which CPU type? (x86?)
Linux (which version) on which CPU type?

...jim

--On 03/15/04 18:36:45 -0500 James Carroll wrote:
> Hi, I'm still having trouble with LookupOp on various platforms.
>
> I've put together a stand-alone program that demonstrates the
> problem.
>
> On windows, everything works great. When I try to enhance the
> red channel on an image, only the red channel changes.
>
> On Linux, changing the red channel actually changes green,
> green changes blue, and blue doesn't have any effect.

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Ho Han Keng

Have a read on Vincent J. Hardy's Java2DAPI.
U will need both the book and the cdrom. There is a demo on LookupOp inside
the cdrom. I experiment on LookupOp recently...

BTW your output is in PNG format (4 channels? ARGB?)
I have only gone as far as swapping red with blue bits on jpegs (INT_RGB).

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".