Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best way to get RGB values?



Thanks for the reply. This search has yielded several options so far. I figured QTJ would have the methods to do this but I've only worked with this for a couple of weeks now. Currently, after getting pixel data from a RawEncodedImage object into a pixel array, I'm using the array in a DirectColorModel (java.awt.image.*), one of several classes that eventually extends from ColorModel. ColorModel defines getRed, etc..... It works for now but I'm still just prototyping. Eventually, I'll have to choose. Suggestions are still welcome :-) The suggestion of just using a RawEncodedImage object to get pixels and doing bit operations works as well. Haven't tried the BufferedImage approach below yet.

Thanks again.

aNt wrote:

Just get the colors from the Gworld. U can then use the QTColor object to
get the 'getRed()' etc from each pixel.. Its not fast mind.. But it works
ok.



Or maybe make a BufferedImage in Java2+, and use a
QTImageProducer to draw your QT graphics into the
BufferedImage, then use any standard Java2 techniques to get
the data (e.g. when instantiating the BufferedImage tell it
to wrap some int array of yours etc.)



The code went on to do it's thing and I get the idea of


what happened.






--
God Bless,
Michael Shipp
_______________________________________________
quicktime-java mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-java
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Best way to get RGB values? (From: aNt <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.