Opened 17 years ago
Closed 17 years ago
#1550 closed defect (fixed)
Problem in gdal_translate and -co "PHOTOMETRIC=MINISBLACK"
Reported by: | 1980 | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | 1.4.1 |
Component: | GDAL_Raster | Version: | 1.4.0 |
Severity: | normal | Keywords: | |
Cc: |
Description (last modified by )
I have a problem which relates to the gdal_translate and -co "PHOTOMETRIC=MINISBLACK" option.
I'm trying to do mosaic with gdalwarp and I'm using 4 band 8 byte Geotiff aerial images. Gdalwarp use the last band as Alpha so the mosaic image is not correct.
Therefore I have to change the last band something different than the alpha. If I'm understand right the gdal_translate -co "PHOTOMETRIC=MINISBLACK" should change the band ColorInterpretation from alpha to something else.
So here are my commands:
G:\Gdal_bug>gdal_translate -of Gtiff -co "PHOTOMETRIC=MINISBLACK" 1076.tif aerial_image.tif Input file size is 400, 200 0...10...20...30...40...50...60...70...80...90...100 - done. G:\Gdal_bug>gdalinfo aerial_image.tif Driver: GTiff/GeoTIFF Size is 400, 200 Coordinate System is `' Origin = (310100.000000000000000,6961000.000000000000000) Pixel Size = (0.500000000000000,-0.500000000000000) Corner Coordinates: Upper Left ( 310100.000, 6961000.000) Lower Left ( 310100.000, 6960900.000) Upper Right ( 310300.000, 6961000.000) Lower Right ( 310300.000, 6960900.000) Center ( 310200.000, 6960950.000) Band 1 Block=400x20 Type=Byte, ColorInterp=Red Band 2 Block=400x20 Type=Byte, ColorInterp=Green Band 3 Block=400x20 Type=Byte, ColorInterp=Blue Band 4 Block=400x20 Type=Byte, ColorInterp=Alpha Program version is FWTOOLS 1.1.4
Attachments (2)
Change History (4)
by , 17 years ago
comment:2 by , 17 years ago
Description: | modified (diff) |
---|---|
Milestone: | → 1.4.1 |
Owner: | changed from | to
comment:3 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I have reproduced the problem and established that it is due to flawed logic in the CreateCopy() method. I have corrected this in trunk and 1.4 branch.
source file in gdal_translate