File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other JSE/JEE APIs and the fly likes change bit-depth of image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "change bit-depth of image" Watch "change bit-depth of image" New topic

change bit-depth of image

Brendan Kennedy
Ranch Hand

Joined: May 02, 2001
Posts: 65
I want to change image bit-depths(always to lower them) to as low as 2 bit,
but also 4, 8 and 12 bits. I think my computer wouldn't be able to handle a 16
bit image... Are there any ways to reduce the amount of data (like read in the
data as greyscale instead of buffering and then changing) being read in . I
guess I could tell it to read in only every fourth pixel or something.. I
Anyways, I need to know how to change the bit depths. I'm using java1.4 and
the latest JAI package, so all the ImageIO stuff for encoding and decoding.
BufferedImage's int values don't cut it(dont' go as far as 2 bit) and simply
thresholding the image doesn't either because my aim is to reduce the amount
of data being sent to the client and this would probably result in a high bit
image with 2 colors used
I agree. Here's the link:
subject: change bit-depth of image
It's not a secret anymore!