-
BufferedImage issue
Hi, I'm new to Java and I have a problem with a project.
How can I apply a filter on a BufferedImage object and obtain a BufferedImage as a result? The thing is I have a filter class whose signature looks like this:
class BrightnessFilter extends RGBImageFilter {...}
and I can apply that on an Image (or BufferedImage) object by creating an ImageProducer and calling createImage on that ImageProducer, like this:
ImageFilter filter=new BrightnessFilter(val);
ImageProducer prod=new FilteredImageSource(img.getSource(),filter);
newimg=createImage(prod);
The thing is, createImage returns an Image object, but I need a BufferedImage instead.
Can anyone help me?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks