Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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?

share|improve this question
    
Perhaps Rasterize is doing some blurred edges for you? –  cormullion May 28 '13 at 19:41
    
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. –  Michael E2 May 28 '13 at 21:35
    
@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. –  Liam William May 28 '13 at 22:08
    
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. –  Michael E2 May 28 '13 at 22:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.