cache png background pixel value

1931
2
10-29-2014 03:26 PM
DaveOrlando
Occasional Contributor III

After viewing my newly cached images, on top of another solid layer, I noticed speckles showing on the imagery. These speckles turned out to be the bottom layer showing through the PNG's 'background'. Apparently a PNG's header info contains a single color that represents the transparent background.

In the process of caching, this background value is inherited from the background value of the source ArcMap document's dataframe. If not altered, the default is 253, 253, 253. After caching, every pixel with the rgb of 253, 253, 253 will be treated as transparent and therefore show any colors that are below it (in whatever application you are using your final cache in)

If you are displaying your cache directly over white, no big deal, if not, expect to see odd 'speckles'.

Since I am displaying my cache over another cache and there is some overlap, before caching I had to set my dataframe's background to something obscure and unnatural like rgb, 200, 100, 200 and hope that there weren't many pixels with this value.

I should also mention that there are settings in ArcMap to change the transparent color of your cache to 'none', but this may not help if you are not using ArcMap.

I'm writing this as a partial solution, only because there is not any info out there about this. Discussion and input is more than welcome.

Thanks

0 Kudos
2 Replies
JenniferMcCall4
Occasional Contributor III

When we want to have a cache overlay another cache, we use a white polygon under our data in ArcMap covering the area of the overlaying cache.  This prevents any speckles in the background of the cache, but allows transparency surrounding our cache.

Additionally, we've opted for a Mixed format, as it will create JPEGs where it doesn't detect transparency, and PNG tiles for where it does.  Since JPEGs are a more compressed format, this helps to reduce the size of the cache.

Thanks for beginning this discussion!  It would be great to hear what other people are doing as well

VCGIAdmin
New Contributor

Hi, I'm having this same problem when caching a raster mosaic.  I haven't had this with other raster mosaics.  I generated the cache using ArcGIS Pro 1.4 instead of ArcGIS Desktop 10.3.1.  The speckle only appears at 1:36,112.  Suggestions?

0 Kudos