View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005970ITKpublic2007-10-26 16:082007-10-26 16:11
ReporterBill Lorensen 
Assigned ToBill Lorensen 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformAllOSAllOS VersionAll
Product Version 
Target VersionFixed in Version 
Summary0005970: TIFF does not read 48bit images
Descriptionhi,

we have found a problem in 48 bit tiff image loading
we have used this workaround in TIFFImageIO::EvaluateImageAt( void* out, void* in )

...
    case TIFFImageIO::RGB_:
      if(m_ComponentType == USHORT)
        {
        unsigned short *image_us = (unsigned short*)out;
        unsigned short *source_us = (unsigned short*)in;

        red = *(source_us);
        green = *(source_us+1);
        blue = *(source_us+2);
        *(image_us) = red;
        *(image_us+1) = green;
        *(image_us+2) = blue;
        if ( m_InternalImage->SamplesPerPixel == 4 )
            {
            alpha = *(source_us+3);
            *(image_us+3) = 65535-alpha;
            }
        }
      else
        {
        red = *(source);
        green = *(source+1);
        blue = *(source+2);
        *(image) = red;
        *(image+1) = green;
        *(image+2) = blue;
        if ( m_InternalImage->SamplesPerPixel == 4 )
            {
            alpha = *(source+3);
            *(image+3) = 255-alpha;
            }
        }
      increment = m_InternalImage->SamplesPerPixel;
      break;
...

best regards,
Mazzetto Manuel, Rizzi Davide


Steps To ReproduceUser supplied a sample file that contained 48 bits per pixel. Ran with itkTIFFImageIOTest. Resulting image was garbage.
TagsNo tags attached.
Resolution Date
Sprint
Sprint Status
Attached Files

 Relationships

  Notes
(0009575)
Bill Lorensen (developer)
2007-10-26 16:11

Applied user patch and the 48 bit image is now read correctly. Added a sample image and an additional test. Modified itkTIFFImageIOTest to read 48 bit rgb pixels.

 Issue History
Date Modified Username Field Change
2007-10-26 16:08 Bill Lorensen New Issue
2007-10-26 16:08 Bill Lorensen Status new => assigned
2007-10-26 16:08 Bill Lorensen Assigned To => Bill Lorensen
2007-10-26 16:09 Bill Lorensen Status assigned => confirmed
2007-10-26 16:09 Bill Lorensen Steps to Reproduce Updated
2007-10-26 16:11 Bill Lorensen Note Added: 0009575
2007-10-26 16:11 Bill Lorensen Status confirmed => closed
2007-10-26 16:11 Bill Lorensen Resolution open => fixed


Copyright © 2000 - 2018 MantisBT Team