Ok, let's say I create a 1x1 pixel image.

i = Image[{{0}}, "Byte"];

Now I Export["image.png", i] the image and import it into Libreoffice or Inkscape in Windows 7. Then I copy and paste the image back into Mathematica 8.0.1 and calculate the ImageDimensions.

ImageDimensions[x = Rasterize[<image>]]

I would expect to receive the 1x1 but instead I get {13, 17} because of appended white borders around the image.

Now If I save the copied output form LibreOffice and Inkscape and then Import the file into Mathematica, I run into no problems.

What file formats have issues with Mathematica so I can consistently paste from the clipboard? I know Mathematica has multiple ways to copy files MetaFile and Bitmap under Edit->Copy As, but how do these relate to different way to paste objects?

  • $\begingroup$ Perhaps Rasterize is doing some blurred edges for you? $\endgroup$
    – cormullion
    May 28 '13 at 19:41
  • 1
    $\begingroup$ On a Mac, copying from the Front End produces an image on the clipboard that depends on the display size in the notebook; you also get artifacts at pixel boundaries. Try Export to a file, and insert the file. $\endgroup$
    – Michael E2
    May 28 '13 at 21:35
  • 1
    $\begingroup$ @MichaelE2 I wish Exporting the image to a file solved the issue, but I am trying to bring images into Mathematica. Mathematica has issues with importing certain types of image formats from clipboard. I am trying to determine what file types in the clipboard cause mathematica problems. Ultimately there are some applications that I use on a regular that don't an export to file option, but can't work around the issue without diagnosing the issue first. $\endgroup$
    – William
    May 28 '13 at 22:08
  • $\begingroup$ Being on a Mac, I'm limited in my ability to help. All I could contribute is that in the process described, going Mma -> App -> Mma, the image seems to be modified in the first step. (In the second step, pasting into Mma, I'm using different apps, and I'm not sure that is relevant to your case.) Anyway, I hope someone else can help you. $\endgroup$
    – Michael E2
    May 28 '13 at 22:13
  • $\begingroup$ Isn't your issue the clipboard? What supports your claim that the issue comes from MMA? $\endgroup$
    – anderstood
    May 27 '19 at 14:08

Your Answer


Browse other questions tagged or ask your own question.