[QGIS-trac] Re: [Quantum GIS] #996: Re: [Quantum GIS] #996: QGIS corrupts JPEG2000 colors

Quantum GIS qgis at qgis.org
Sat Jan 3 20:52:40 EST 2009


#996: Re: [Quantum GIS] #996: QGIS corrupts JPEG2000 colors
-----------------------------------------------------+----------------------
        Reporter:  coatman                           |         Owner:  nobody       
            Type:  defect                            |        Status:  reopened     
        Priority:  major: does not work as expected  |     Milestone:  Version 1.0.1
       Component:  Rasters                           |       Version:  HEAD         
      Resolution:                                    |      Keywords:  kakadu raster
Platform_version:                                    |      Platform:  OS X         
        Must_fix:  No                                |   Status_info:  0            
-----------------------------------------------------+----------------------
Comment (by Coatman):

 When gdal_translate depends upon Jasper based -of JPEG000 to read a .tif,
 write a .jp2, and then write a .tif, the final .tif contains all black
 pixels, but when gdal_translate depends upon Kakadu based -of JP2KAK to
 read a .tif, write a .jp2, and then write a .tif, the final .tif is
 properly written and properly displays with all of the image viewing
 applications I have.  My GDAL has both Jasper JPEG2000 and Kakadu JP2KAK.
 With gdal_translate, when writing a .jp2, the user specifies the use of
 Jasper or Kakadu with -of JPEG2000 or -of JP2KAK.  With gdal_translate,
 when reading a .jp2, the user specifies the use of Jasper or Kakadu with
 export GDAL_SKIP=JP2KAK or export GDAL_SKIP=JPEG2000.

 I could use QGIS now if I knew how to specify to QGIS that it use Kakadu
 JP2KAK instead of using the default Jasper JPEG2000.
 Since gdal_translate Jasper JPEG2000 is not working, but gdal_translate
 Kakadu JP2KAK is working, P-L-E-A-S-E tell me

 How to specify that QGIS use Kakadu JP2KAK, and not use Jasper JPEG2000?


 Greg


 gdal_translate -ot Byte -of JPEG2000 -co "mode=int" rgbwcmyk01_YeGeo.tif
 rgbwcmyk01_YeGeo_GDAL16_JPEG2000.jp2

 export GDAL_SKIP=JP2KAK

 gdal_translate -ot Byte -of GTiff -co "COMPRESS=NONE"
 rgbwcmyk01_YeGeo_GDAL16_JPEG2000.jp2 rgbwcmyk01_YeGeo_GDAL16_JPEG2000.tif

 The resulting, Jasper dependent, .tif contains only all black pixels.

 gdal_translate -ot Byte -of JP2KAK -co "QUALITY=100" rgbwcmyk01_YeGeo.tif
 rgbwcmyk01_YeGeo_GDAL16_JP2KAK.jp2

 export GDAL_SKIP=JPEG2000

 gdal_translate -ot Byte -of GTiff -co "COMPRESS=NONE"
 rgbwcmyk01_YeGeo_GDAL16_JP2KAK.jp2 rgbwcmyk01_YeGeo_GDAL16_JP2KAK.tif

 The resulting, Kakadu dependent, .tif properly displays.

-- 
Ticket URL: <http://trac.osgeo.org/qgis/ticket/996#comment:55>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list