[gdal-dev] Fw: Building GDAL with ECW support
pteroglossus at pm.me
pteroglossus at pm.me
Fri Feb 5 17:28:20 PST 2021
Hi Lars, thanks you for the link. I was able to reduce the file's size to 1.2 GB. I should have reread Richard's early messages, he did mention JPEG compression and YCBCR colors. I used:
k at k-GS60-6QE:~$ gdal_translate -co COMPRESS=JPEG -co PHOTOMETRIC=YCBCR -co TILED=YES /media/k/Data/Data/Perso/Carto/SCAN50_2012.ecw SCAN50_2012.tif
Input file size is 75000, 95000
0...10...20...30...40...50...60...70...80...90...100 - done.
I did however lose all the colors on the map after the conversion (see [screenshot](https://pasteboard.co/JN1JAYF.png)), and the drop in is quite flagrant.
Here is the output of gdalinfo for both files if it can help:
k at k-GS60-6QE:/media/k/Data/Data/Perso/Carto$ gdalinfo ./SCAN50_2012.ecw
Driver: ECW/ERDAS Compressed Wavelets (SDK 5.5)
Files: ./SCAN50_2012.ecw
Size is 75000, 95000
Origin = (75000.000000000000000,675000.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Metadata:
COLORSPACE=RGB
COMPRESSION_RATE_TARGET=10
VERSION=2
Corner Coordinates:
Upper Left ( 75000.000, 675000.000)
Lower Left ( 75000.000, 200000.000)
Upper Right ( 450000.000, 675000.000)
Lower Right ( 450000.000, 200000.000)
Center ( 262500.000, 437500.000)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Description = Red
Overviews: 37500x47500, 18750x23750, 9375x11875, 4687x5937, 2343x2968, 1171x1484, 585x742, 292x371, 146x185
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
Description = Green
Overviews: 37500x47500, 18750x23750, 9375x11875, 4687x5937, 2343x2968, 1171x1484, 585x742, 292x371, 146x185
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
Description = Blue
Overviews: 37500x47500, 18750x23750, 9375x11875, 4687x5937, 2343x2968, 1171x1484, 585x742, 292x371, 146x185
k at k-GS60-6QE:/media/k/Data/Data/Perso/Carto$ gdalinfo ./SCAN50_2012.tif
Driver: GTiff/GeoTIFF
Files: ./SCAN50_2012.tif
Size is 75000, 95000
Origin = (75000.000000000000000,675000.000000000000000)
Pixel Size = (5.000000000000000,-5.000000000000000)
Metadata:
COLORSPACE=RGB
COMPRESSION_RATE_TARGET=10
VERSION=2
Image Structure Metadata:
COMPRESSION=YCbCr JPEG
INTERLEAVE=PIXEL
SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left ( 75000.000, 675000.000)
Lower Left ( 75000.000, 200000.000)
Upper Right ( 450000.000, 675000.000)
Lower Right ( 450000.000, 200000.000)
Center ( 262500.000, 437500.000)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
Description = Red
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
Description = Green
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
Description = Blue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210206/63cdec0a/attachment.html>
More information about the gdal-dev
mailing list