I've run into this myself, and it seemed like the ColorModel class
assumes that you'll use either 1 byte or 1 int for each pixel. So it
seemed like the best you could do was switch to 8-bit indexed color, which
is at least a 4x improvement. If there is in fact a way to use a 1-bit
color model, I'd love to hear it!
Aaron
On Tue, 2 Nov 1999, Eric Chao wrote:
> Hi, I am currently trying to create a 1-bit depth graphics in memory. I
> do not need color capabilities, just black-and-white. I am using a
> buffer made up of integers but it is a waste of memory when I can use
> 1-bit for a pixel instead of 32-bits. What is the best way to do that?
> I need to switch to the more efficient way since Java complains
> OutOfMemory exception on large images....
>
> Eric Chao
> [EMAIL PROTECTED]
> Merlin Software Technologies Inc.
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
>
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]