Save Image with drawn shape not with original resolution

13 views (last 30 days)
Hi there, I was trying to save an image with color drawn shape (such as a rectangular) as tiff or png file. However the saved image is not as the same resolution as the orignal image, seems being compressed a lot. Here are the steps:
1. read in an image with size 7000*2000 uint 8. Matlab shows "Image is too big to fit on screen; displaying at 8%." 2. draw a red rectangular 3. Save the fig using "export_fig" or "InsertInImage" function. The saved image appears with much lower resolution comparing to the original grayscale image.
Could you please advice what would be the best way to save such image? Thank you, Ellen

Accepted Answer

tesarj13 on 23 Oct 2018
Save image with imwrite function!
Ellen Zhang
Ellen Zhang on 25 Oct 2018
That works. Thank you very much! I was using 'rectangular' to draw boxes and 'export_fig" to save images. 'insertShape" works better in this case.

Sign in to comment.

More Answers (0)


Find more on Images in Help Center and File Exchange




Community Treasure Hunt

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

Start Hunting!