Why do the square pixels of a figure change the shape and size after saving?

1 view (last 30 days)
I try to save or export figures I created in Matlab but the square pixels have different shapes in the saved image. I also tried saving the figure as different imagetypes but I never got an image that has the exact same pixels as the matlab figure. In the first picture you can see a screenshot of the pixels in the matlab figure.
In the second picture you can see a screenshot of the pixels of an exported version of the same figure.
Does anybody know why that happens?

Accepted Answer

Image Analyst
Image Analyst on 31 Jan 2013
Are you saving it as jpg? The lossy compression algorithm will combine pixels like that. I never use jpg. Try using PNG, which is a lossless compression file format. It will compress the files by a factor of about 1/3 - not as much as jpg but it doesn't alter the picture at all like jpg does.
  1 Comment
Hannes
Hannes on 31 Jan 2013
I dont save it as a jpg. In this case I saved it as .tif no compression image. but I tried out all different formats. But you are right jpg looks the worst.

Sign in to comment.

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!