Ticket #359 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

Exception when reading signed 16 bit images

Reported by: melissa Owned by: curtis
Priority: major Milestone:
Component: bio-formats Severity: major
Keywords: Cc: Sebastien.SCHAUB@…
Blocked By: Blocking:

Description

As of r4804, attempting to read a signed 16-bit image throws the following exception:

Exception in thread "main" java.lang.IllegalArgumentException: Raster ShortInterleavedRaster: width = 384 height = 384 #numDataElements 1 is incompatible with ColorModel ColorModel: #pixelBits = 16 numComponents = 4 color space = java.awt.color.ICC_ColorSpace@347124 transparency = 3 has alpha = true isAlphaPre = false
	at java.awt.image.BufferedImage.<init>(BufferedImage.java:616)
	at loci.formats.AWTImageTools.openImage(AWTImageTools.java:820)
	at loci.formats.FormatReader.openImage(FormatReader.java:521)
	at loci.formats.ImageReader.openImage(ImageReader.java:344)
	at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:485)
	at loci.formats.tools.ImageInfo.testRead(ImageInfo.java:59)
	at loci.formats.tools.ImageInfo.main(ImageInfo.java:655)

This can be reproduced with deltavision/ome/Antarctic_Diatom_D3D_01.dv (among others).

Change History

comment:1 Changed 11 years ago by curtis

  • Cc Sebastien.SCHAUB@… added

comment:2 Changed 11 years ago by curtis

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

(In [4874]) Use USHORT instead of SHORT for 16-bit integer SignedColorModel. Fixes #359. This is consistent with the code from before r4804, but does not seem logical. Further investigation is warranted into the ramifications of this approach.

Note: See TracTickets for help on using tickets.