JMESwing color problems

Hi there!!!



I

Sorry, it looks right if it is instead:



BufferedImage.TYPE_INT_BGR



Which doesn’t make sense to me since the image is pulled from GL as RGBA… Anyhow, that’s temporarily “fixed” and in cvs. If anyone can explain why it’s RGBA one way and BGR the other, or if it doesn’t fix it, let me know and I’ll be happy to look for a better fix.

Thank you for your answer renanse



Sorry I can

Hmm, I don’t personally see a performance hit, but it could be machine/card based… iirc, though I chose RGB for performance reasons related to proper fetching from GL. As for solving the problem, I admit I don’t have perfect test cases to tell if the problem goes away. :confused:



It seems like the drawing part of the alg is the issue really… we have a valid image from OpenGL, just not getting it to Swing with colors in the format Swing wants. What you’re proposing would do it (it sounds like) but we can use GL12.BGRA… Does it cause a performance hit though? Like I said, I thought I did RGB for performance. (of course, if it doesn’t look right, performance is meaningless.)

Ok, checked in the fix using GL12 and reverted to RGB in the constructor… things LOOK good, but please double check.



This of course means that you need an OpenGL 1.2 compliant card to do the Swing integration, but the current speed restrictions already make it so you need a halfway decent card so that’s not a big deal.

Yeah!!!



That

Cool, sorry about the trouble and thanks for bringing it up. :slight_smile: