[Gdal-dev] RE: Reading JPEG2000 JPC and J2K

Peng Gao pgao at esri.com
Fri Nov 11 13:52:50 EST 2005


Thanks all for the info.

I messed up with my small sample images by renaming them to .jp2 from
.jpc, .j2c, and etc, 
to work around
an extension checking problem in my system. It seems that JP2KAK driver
uses the extension name to switch to different modes. I properly fixed
the extension name checking problem, and now all three of my sample
images
are displaying with their original extension.

But I also have lots of more JPC images. Those are DOQQ images. The
following is
the info of one of them. The info looks alright, and but GDAL failed to
read it,
in CPLErr JP2KAKRasterBand::IReadBlock( int nBlockXOff, int nBlockYOff,
...),
with an execption, Microsoft C++ exception:
kdu_cpl_error_message::JP2KAKException @ 0x0012d3a0,
on the first block (0, 0).


C:\GDAL>bld\bin\gdalinfo C:\Data\apu04_2ft_sea46122f8.jpc
Driver: JP2KAK/JPEG-2000 (based on Kakadu)
Size is 15720, 22818
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0,22818.0)
Upper Right (15720.0,    0.0)
Lower Right (15720.0,22818.0)
Center      ( 7860.0,11409.0)
Band 1 Block=512x128 Type=Byte, ColorInterp=Red
  Overviews: 7860x11409, 3930x5705, 1965x2853, 983x1427, 492x714,
246x357, 123x1
79
Band 2 Block=512x128 Type=Byte, ColorInterp=Green
  Overviews: 7860x11409, 3930x5705, 1965x2853, 983x1427, 492x714,
246x357, 123x1
79
Band 3 Block=512x128 Type=Byte, ColorInterp=Blue
  Overviews: 7860x11409, 3930x5705, 1965x2853, 983x1427, 492x714,
246x357, 123x1
79

C:\GDAL>


> -----Original Message-----
> From: Chapman, Martin [mailto:MChapman at sanz.com] 
> Sent: Friday, November 11, 2005 10:05 AM
> To: Peng Gao; gdal-dev at lists.maptools.org
> Subject: RE: [Gdal-dev] RE: Reading JPEG2000 JPC and J2K
> 
> Gao,
> 
> You can use the MrSID driver, Kakadu or Jasper.  I would 
> recommend MrSID.  You need to download the MrSID DSDK from 
> Lizardtech for reading and you need to get the ESDK for 
> read/write.  To get the ESDK you will have to go through the 
> clearance process first I believe.  The MrSID driver reads 
> J2k and MrSID.  ECW can also read the new jpeg formats but I 
> don't know if that is enabled through GDAL yet.
> 
> Martin
> 
> -----Original Message-----
> From: gdal-dev-bounces at lists.maptools.org
> [mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Peng Gao
> Sent: Friday, November 11, 2005 7:48 AM
> To: gdal-dev at lists.maptools.org
> Subject: [Gdal-dev] RE: Reading JPEG2000 JPC and J2K
> 
> 
> > -----Original Message-----
> > From: Peng Gao
> > Sent: Friday, November 11, 2005 6:30 AM
> > To: gdal-dev at lists.maptools.org
> > Subject: Reading JPEG2000 JPC and J2K
> > 
> > I got some images with .jpc and .j2k extensions. Is there any way I 
> > can read them using GDAL?
> > I renamed them to .jp2, and it didn't work. I am using Kakadu codec.
> > 
> > Gao, Peng
> > 
> 
> I read the doc on JP2KAK driver again, and it should support 
> JPC. The problem could be the image I have. Attached is a 
> problem jpc image.
> 
> Gao, Peng
> 




More information about the Gdal-dev mailing list