aspose file tools
The moose likes Java in General and the fly likes Converting BufferedImage bit-depth Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Converting BufferedImage bit-depth" Watch "Converting BufferedImage bit-depth" New topic
Author

Converting BufferedImage bit-depth

Brian Doidge
Greenhorn

Joined: Jul 05, 2005
Posts: 1
Hi all,

I need to convert a 32-bit PNG (RGB) to an 8-bit (indexed) version, with as little loss in quality as possible, although some is inevitable and accecptable. I've been able to pull this off by using ColorConvertOp to create a compatible destination image with the appropriate (default) IndexedColorSpace and SampleModel and just painting to it, but the dithering on this was terrible.

What I need to do is create my own palette for the destination image, then create the image itself. In the first part I (think) I've been successful, but I'm getting lost in precisely how to create the destination image and get the right data into it.


There are actually 11 types of people in the world: those who know binary, those who don't and those who still find this joke funny.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Converting BufferedImage bit-depth
 
Similar Threads
How to create a servlet that answers for an image?
Help With File Class
Convert html into an image
drawImage not getting the image drawn before printing!
Question about rescaling/rendering lots of big pictures