Message Boards Message Boards

Export of Geographics anti-aliasing problem

I have the following code:

img= [IMAGE];
out=GeoGraphics[{GeoStyling[{"GeoImage",img}],poly},ImageSize->1000,GeoRange->"World",GeoProjection->"Equirectangular"]
Export["out.png",out]

'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:

enter image description here

But the exported file looks much worse:

enter image description here

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?

Attached is the notebook.

Attachments:
POSTED BY: Sander Huisman
6 Replies
POSTED BY: Sander Huisman

Does this solve the problem

Export["output.png", out, ImageSize -> 3000]

if you resample image back to 1000 px ? You could adjust thickness of lines accordingly.

POSTED BY: Vitaliy Kaurov

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...

POSTED BY: Sander Huisman

Sander, can you define poly ?

POSTED BY: Vitaliy Kaurov

O sorry, poly is just a rectangle. I updated my code here.

Attachments:
POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract