Ticket #3012 (closed defect: invalid)

Opened 4 years ago

Last modified 4 years ago

PPM Driver 16bit Support Byte Order Decision Questionable

Reported by: warmerdam Owned by: warmerdam
Priority: normal Milestone: 1.6.2
Component: GDAL_Raster Version: unspecified
Severity: normal Keywords: pnm
Cc:

Description

I have discovered that gdal cannot read PPM binary files produced with the djpeg (decompress jpeg) on intel tool due to incorrect byte order handling. It is not immediately clear if the error is in GDAL or in djpeg. I have uploaded the ppm produced with djpeg to:

 http://home.gdal.org/tmp/12.ppm

Please use the ppm tools to convert this to ascii format and determine if it is correct or not. If it is correct the byte swapping information in pnmdataset.cpp will need to be adjusted.

If the .ppm file is wrong, then I'll look into a correction in the libjpeg source for djpeg.

Change History

Changed 4 years ago by chaitanya

  • status changed from new to assigned

Frank,

According to  PPM Format Specification the file  12.ppm is wrong. All the 16bit color values has the bytes reversed.

Changed 4 years ago by chaitanya

  • owner changed from chaitanya to warmerdam
  • status changed from assigned to new

Changed 4 years ago by warmerdam

  • status changed from new to closed
  • resolution set to invalid

I have corrected this upstream in libjpeg. GDAL is good.

 http://sourceforge.net/support/tracker.php?aid=2809967

Note: See TracTickets for help on using tickets.