Hi experts!

I'm trying to make a (lower quality) copy of a GeoTIFF file, and add
overviews to that copy.
It seems to work fine, BUT the resulting file has the colors messed up!
With JPEG_QUALITY=30, the colors seem to be "faded".
With JPEG_QUALITY=90, they're more "intense" than the original.
GDALINFO reports identical info for the input and output files (except for
the overviews and quality)

The complete code (VisualBasic 2010, 32bits):

        Dim gtiffdriver As Driver = Gdal.GetDriverByName("GTIFF")
        Dim viewfileoptions() As String = {"TFW=YES", "TILED=YES",
"BLOCKXSIZE=256", "BLOCKYSIZE=256",
                                            "COMPRESS=JPEG",
"JPEG_QUALITY=30", "PHOTOMETRIC=YCBCR",
                                            "INTERLEAVE=PIXEL",
                                            "PROFILE=GeoTIFF",
"BIGTIFF=IF_SAFER"}
        Dim inputdataset As Dataset = Gdal.Open(inputfile, Access
.GA_ReadOnly)
        Dim outputdataset As Dataset
 = gtiffdriver.CreateCopy(outputfile, inputdataset, 1, viewfileoptions,
Nothing, Nothing)
        outputdataset.BuildOverviews("GAUSS", overviews)
        outputdataset.FlushCache()
        outputdataset.Dispose()
1 or 0 in the strict parameter to CreateCopy makes no difference.
I've tested both the 1.7.x version and the trunk (18dev).
-
Helge
_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to