NOTICE! This is a static HTML version of a legacy LOCI Software ticket.

LOCI projects are now located on GitHub. The Bio-Formats project can be found here.

Ticket #307 (closed task: fixed)

Opened 2008-07-09T13:00:19-05:00

Last modified 2008-07-09T14:09:36-05:00

Split IndexedColorModel into Index16ColorModel and Index32ColorModel

Reported by: curtis Owned by: melissa
Priority: minor Milestone:
Component: bio-formats Severity: cosmetic
Keywords: Cc:
Blocked By: Blocking:


Core Java has an IndexColorModel class for 24-bit RGB look-up tables keyed with 8-bit indices. However, some microscopy formats use 16-bit indices into 48-bit RGB look-up tables, which are not supported, so we created our own IndexedColorModel class that supports 8-bits-per-channel, 16-bits-per-channel, and 32-bits-per-channel look-up tables with red, green, blue and alpha components.

This functionality is fine, but the naming scheme is confusing. I would prefer that we split the code into new Index16ColorModel (for 16-bits-per-channel) and Index32ColorModel (for 32-bits-per-channel) classes, to avoid confusion with Java's built-in IndexColorModel class. We could also have an Index8ColorModel, if Java's IndexColorModel has any undesirable limitations (such as lack of support for an alpha channel).

Change History

comment:1 Changed 2008-07-09T14:09:36-05:00 by melissa

  • Status changed from new to closed
  • Resolution set to fixed

(In [4178]) Moved 16-bit lookup table support from IndexedColorModel to Index16ColorModel (closes #307). 32-bit lookup tables are no longer supported (they weren't really supported to begin with) and java.awt.image.IndexColorModel is now used for 8-bit support.