Opened 9 years ago

Last modified 9 years ago

#5761 closed defect

gdalwarp zeroes all alpha pixels from grey+alpha image — at Version 2

Reported by: cdestigter Owned by: warmerdam
Priority: normal Milestone:
Component: default Version: svn-trunk
Severity: normal Keywords:
Cc:

Description (last modified by cdestigter)

When warping a grey+alpha image, gdal appears to zero out all the alpha pixels, resulting in a completely invisible image.

test case:

gdalinfo -stats ~/c/in.tif | grep Minimum
rm -f ~/c/out.tif* ; gdalwarp ~/c/in.tif ~/c/out.tif
gdalinfo -stats ~/c/out.tif | grep Minimum
  Minimum=0.000, Maximum=176.000, Mean=86.546, StdDev=59.195
  Minimum=0.000, Maximum=255.000, Mean=176.375, StdDev=117.760
Creating output file that is 16P x 15L.
Processing input file /Users/cdestigter/c/in.tif.
0...10...20...30...40...50...60...70...80...90...100 - done.
  Minimum=0.000, Maximum=176.000, Mean=86.546, StdDev=59.195
  Minimum=0.000, Maximum=0.000, Mean=0.000, StdDev=0.000

Adding -setci doesn't help. If I add -dstalpha I get a good alpha band in band 3, but then I have to remove band 2 somehow.

Tested on both stock 1.11.0 and trunk (r28101), occurs on both.

Attached in.tif.

Change History (3)

by cdestigter, 9 years ago

Attachment: in.tif added

comment:1 by cdestigter, 9 years ago

Resolution: invalid
Status: newclosed

d'oh. User error! I wasn't removing out.tif.aux.xml which contained saved stats. Disregard :)

comment:2 by cdestigter, 9 years ago

Description: modified (diff)
Resolution: invalid
Status: closedreopened

This *is* actually a real bug, I just wasn't on my game the other day.

I updated the above instructions to reproduce the actual bug.

Note: See TracTickets for help on using tickets.