‘out’ looks good and only has some slight problems with anti-aliasing around the lines in img. See also the notebook.
The image in mathematica looks like:
The ‘overlay’ is created in mathematica, rastering a ContourPlot as “Image” with Background->None. The overlay image (img) does not show this anti-aliasing artifacts. The preview in mathematica shows a bit of anti-aliasing problems, but the export a lot.
How can I remedy the (lack of) anti-aliasing? Any ideas?
Vitaliy, I think it more something fundamental. Probably you can make it less by resampling very high resolution. But I keep seeing it, not really sure if it gets less. I think the transparancy channel for the rasterize does something wrong…
I think the problem comes when the lcp image is resized (because the transparency). Doing the composition in other way lets you have the nice image we all expect:
I tried first doing the resize over the lcp, but got the same bad result, so better do the composition first, then the resizing. I know this looks like a workaround, but the "GeoImage" way does perform something like the resize, so has the same artifacts as ImageResize[lcp, 1000].
This works better! Thanks. I still think, though, this is a bug. The resizing of something anti-aliased/opacity channel should not matter that much and should not introduce these dark grey-ish pixels.