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 #363 (closed defect: fixed)

Opened 2009-03-02T16:17:37-06:00

Last modified 2009-03-30T10:59:14-05:00

AWTImageTools.openImage misrepresents negative pixel values for int16

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

Description

When reading an int16 BufferedImage using the AWTImageTools.openImage method, negative pixel values get represented as positive as though they are unsigned. The cause is likely related to the use of DataBuffer.USHORT rather than DataBuffer.SHORT when constructing a SignedColorModel. In addition, further testing needs to be done to verify whether int8 and int32 have similar problems.

For an example, see deltavision/curtis/AD-test-int16.dv.

Change History

comment:1 Changed 2009-03-30T10:12:15-05:00 by melissa

AWTImageTools.openImage correctly represents signed 16-bit data as of r4952. Still need to check for problems with signed 8 and 32 bit data.

comment:2 Changed 2009-03-30T10:59:14-05:00 by melissa

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

Signed 8-bit data (FormatTools.INT8) is not supported - see source:/trunk/components/bio-formats/src/loci/formats/AWTImageTools.java#L368 and ticket #374.

Signed 32-bit data works correctly, but unsigned 32-bit data is not supported - see source:/trunk/components/bio-formats/src/loci/formats/AWTImageTools.java#L446 and ticket #375.