By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,515 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,515 IT Pros & Developers. It's quick & easy.

Accessing Rasters

P: n/a
I need to implement a 'multiply' method for a filled shape, and figured
the best way to do this is by extending Composite. I've done this, and
also created a CompositeContext class that will perform the actual work
of composition my shape with the background. However, I don't know very
much about rasters.

The CompositeContext interface provides me with the method
public void compose(Raster src, Raster dstIn, WritableRaster dstOut)

Somehow I need to determine the RGBA values of each pixel in src and
dstIn, perform a calculation, and write the result to the coresposding
pixel in dstOut. These rasters should have the same dimensions.

The interface methods also provide me with a ColorModel srcColorModel
and a ColorModel dstColorModel.

Any idea what I can do? I can't figure out how to convert a Raster and
a ColorModel into RGBA.

Mark McKay
Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.