Opened 15 years ago
Closed 14 years ago
#2913 closed defect (worksforme)
color problems JPEG2000
Reported by: | mdsullen | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | GDAL_Raster | Version: | unspecified |
Severity: | normal | Keywords: | JP2KAK |
Cc: |
Description
Using the FWTools 2.0.6 Linux, displaying a JPEG2000 image via Mapserver causes the .jp2 file to be displayed with incorrect or odd coloring. For example, the whites seem pink, the greens are more aqua colored. I'm assuming the kakadu JPEG2000 driver included in the version of FWTools/GDAL should be able to display this image correctly. As a side note, OpenEV in the FWTools distribution also displays the .jp2 image with the same color problems, so I'm assuming it's a GDAL issue. I'm running Ubuntu 8.10 on AMD64.
Attachments (1)
Change History (8)
follow-up: 2 comment:1 by , 15 years ago
Keywords: | JP2KAK added |
---|
comment:2 by , 15 years ago
Replying to warmerdam:
Can you provide a pointer to the data file in question? (the smaller the better)
I added an attachment that I used to determine the color problems. Just as an experiment, I downloaded the FWTools for Windows and used that packaged system to look at the image. It displayed correctly, or as I would expect it to. gdalinfo reported that the driver used for the .jp2 image on Windows was JP2ECW, while gdalinfo on Linux reported the JP2KAK driver. Can I direct GDAL to use the JP2ECW driver on Linux rather than the JP2KAK driver? Perhaps then the image would display correctly?
follow-up: 4 comment:3 by , 15 years ago
Resolution: | → duplicate |
---|---|
Status: | new → closed |
This sounds very much like http://trac.osgeo.org/gdal/ticket/2732 that has been fixed recently... It is probable that the latest windows FWTools includes the bug fix, so that could explain what you observe. (The production of FWTools for Linux is currently discontinued)
If you're in a position of building GDAL from source, you could try to pull GDAL 1.6 SVN head and test it.
Otherwise, you can skip the JP2KAK driver by setting GDAL_SKIP=JP2KAK as an environment variable.
Closing as a duplicate. Please reopen if you still observe the error with binaries compiled from latest GDAL sources.
comment:4 by , 15 years ago
Resolution: | duplicate |
---|---|
Status: | closed → reopened |
Replying to rouault:
This sounds very much like http://trac.osgeo.org/gdal/ticket/2732 that has been fixed recently... It is probable that the latest windows FWTools includes the bug fix, so that could explain what you observe. (The production of FWTools for Linux is currently discontinued)
If you're in a position of building GDAL from source, you could try to pull GDAL 1.6 SVN head and test it.
Otherwise, you can skip the JP2KAK driver by setting GDAL_SKIP=JP2KAK as an environment variable.
This does seem to do the trick for allowing correct coloring of images. I did export the environment variable GDAL_SKIP=JP2KAK and upon opening the image with OpenEV, things looked fine. I then added the line CONFIG "GDAL_SKIP" "JP2KAK" to my .map file fully expecting things to work, however this was not the case. I received this error:
[Mon Mar 30 16:15:03 2009] [error] [client 127.0.0.1] libgcc_s.so.1 must be installed for pthread_cancel to work
[Mon Mar 30 16:15:03 2009] [error] [client 127.0.0.1] /usr/local/apache2/cgi-bin/mapserv: line 9: 6968 Aborted $FWTOOLS_HOME/bin/basename $TARGET
"$@"
Now, my mapserv program is in the cgi-bin directory of my apache installation, and I've ran the install.sh script. It's my understanding that I shouldn't have to alter the LD_LIBRARY_PATH to run Mapserver. So why the error? If I take the CONFIG line out of my .map file, the JP2KAK driver is used and no error is given. The images is displayed, but back to my original problem of wrong color. Is this another problem with the driver model?
I realize this might not be the place for this question, but I'm still searching for the solution to my original question which is correct color display of a JPEG2000 image via mapserver.
Regards, Mike
follow-up: 6 comment:5 by , 15 years ago
Mike,
You are seeing some funky issue with the ECW libraries. I've given up trying to solve them. I just don't think you can trust the ECW libraries as they are used by GDAL in something like MapServer on linux.
comment:6 by , 15 years ago
Replying to warmerdam:
Mike,
You are seeing some funky issue with the ECW libraries. I've given up trying to solve them. I just don't think you can trust the ECW libraries as they are used by GDAL in something like MapServer on linux.
Frank,
So are you suggesting a platform change? i.e., Windows in lieu of Linux? Would I have better success using JPEG2000 imagery in mapserver if I were running on the Windows platform?
Regards, Mike
comment:7 by , 14 years ago
Resolution: | → worksforme |
---|---|
Status: | reopened → closed |
Closing as it works fine for me with trunk and JP2ECW, JP2MrSID and JPEG2000 driver. Could not test with JP2KAK driver.
Don't use FWTools 2.0.6 for Linux as it is outdated now and no longer supported. You can compile GDAL yourself or maybe use precompiled packages for Ubuntu from https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable
Can you provide a pointer to the data file in question? (the smaller the better)