Geotiff transparency for Neatline

I have a tiff that I georectified in ArcGIS and I am able to display it in Neatline but the issue I have is that because ArcMap puts black borders around the image you have to strip the borders to make them transparent so it displays correctly in Neatline. I am able to do all of that by using
gdalwarp -srcnodata 0 -dstalpha input.tif output.tif
and then
gdal_translate -of GTiff -a_srs EPSG:4326 file2.tif file2_rebuilt.tif

The problem with that is that because my map is black and white it actually makes anything black on my map transparent as well, not just the borders.

Anyone has any idea how to avoid that?

Check the no data setting in ArcGIS; it's sometimes 256 which would then be


gdalwarp -srcnodata 256 -dstalpha input.tif output.tif

I have the no data setting in ArcGIS set to 0. Is it supposed to be set to 256?

If you put 256 for no data then the whole image becomes black, you can't see anything.

If ArcGIS is adding the border, you may have to remove it in that tool. Unfortunately I'm not that familiar with the ins-and-outs of that tool, but this might help: http://gis.stackexchange.com/questions/8556/is-there-a-way-to-clip-an-image-with-the-basic-arcview-package-9-3

I am following David McClure's blog in which he explains all of that which sort of works but it also strips anything else that's black on my map:
http://dclure.org/tutorials/neatline-maps-georeferencing/

Does David McClure come to these forums these days?

Unfortunately, making everything black be transparent is expected. Basically, you're telling gdal that any points that are black in the image should not be displayed.

Since that's not what you want, you can try the longer instructions that he gives in the second part of Using Neatline with historical maps :: Part 2 – Transparency. He uses Photoshop to define what should be transparent. It's more complicated and involved, but it allows you to control the exact regions that you want to be transparent.

Eric