Error while exporting a graph in png, or jpeg?

Hi, I’m having problems to export a simple graph. I’m simply clicking save selections as. But I’m getting the same error even choosing different formats.

x = 2^-Abs[n];

ticks = {{-10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 
    6, 7, 8, 9, 10}, {0.2, 0.4, 0.6, 0.8, 1}};

xg = DiscretePlot[x, {n, -10, 10}, PlotTheme -> "Monochrome", 
  PlotRange -> Full, Ticks -> ticks]

imagen_2021-03-07_214205.png

I don’t understand what is happening. It’s saying import data as JPEG when I’m trying to export that graph.
I try with different graphs and it’s the same, the only format possible to export was pdf.
Maybe it’s a problem with my Mathematica.
Thank You!!!

Carlos,

To Export the graph, add the line:

Export["mypath/myfile.png", xg]

or

Export["mypath/myfile.jpg", xg]

You can experiment with various export options, or use different formats. You can find the details for exporting if you type “JPEG” or “PNG” or “TIFF” in the documentation. for every file format it will give you the appropriate Export options available.

Regards,

Neil