[gdal-dev] Multi-band JPEG2000 support?

Even Rouault even.rouault at spatialys.com
Wed Nov 26 08:41:59 PST 2014


Le mercredi 26 novembre 2014 17:31:34, jplacy2 a écrit :
> Hi Folks-
> 
> I'm attempting to generate some 4-band JP2 files using the GDAL 1.11 Win64
> binary acquired from gisinternals.com.
> 
> I quickly ran into a problem... JP2 driver doesn't like four bands:
> 
> gdal_translate --debug on -of JP2OpenJPEG test.tif test.jp2
> GDAL: GDALOpen(test.tif, this=000000000061CB70) succeeds as GTiff.
> Input file size is 5920, 7700
> ERROR 6: Unable to export files with 4 bands
> GDAL: GDALClose(test.tif, this=000000000061CB70)
> 
> So my question is simple: what options are there for creating multi-band
> jpeg2000's with GDAL on the Windows platform?  I understand there are other
> driver options, but from what I have read, they all require a license
> and/or a recompile of GDAL from the source... the latter is not really in
> my skill set.

Jim,

This is known as http://trac.osgeo.org/gdal/ticket/5695. The restriction has 
been put, because currently the driver couldn't not produce correct RGBA files 
with the alpha band correctly marked as such. I may have the opportunity to 
work on that in a medium term.

In the meantime, you could perhaps try the opj_compress utility of openjpeg ( 
https://code.google.com/p/openjpeg/wiki/Downloads?tm=2 ), but it will likely 
has the same flow as indicated above if you're interested in RGBA images.

Even

> 
> Thanks for any guidance,
> Jim
> 
> 
> 
> 
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Multi-band-JPEG2000-support-tp5175104.
> html Sent from the GDAL - Dev mailing list archive at Nabble.com.
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list