[gdal-dev] Return codes in gdalwarp
Christopher Barker
Chris.Barker at noaa.gov
Fri Nov 13 11:23:56 EST 2009
Michal Migurski wrote:
> The GTiff files that I
> might see as input to this script include palette and non-palette
> images,
> This didn't work with palette images, for which I
> got an error like: "ERROR 1: JPEGSetupEncode:PhotometricInterpretation 3
> not allowed for JPEG"
Enhanced error reporting would be great, but this particular issue could
(should) be addressed in another way.
It's a pretty common case that visual images can be stored either as
palette or RGB(A). However, when you want to re-size, or warp an image,
palette often doesn't work well -- you'll generally get a better image
if you allow interpolated (anti-aliased) colors.
In your case, I'd probably convert all the palette images to RGB, then
do your warping, which would solve your compression issue, as well as
give you better results.
It would be nice if GDAL could (optionally) do this on-the0fly
internally, when re-scaling or warping images, but I don't think it can
(am I wrong?)
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the gdal-dev
mailing list