MATLAB: How to store an image from imshow

image processingImage Processing Toolbox

I have displayed an image using imshow and plotted some segmentations using lines.
Can I know how can I store the resulting image without changing image dimensions?(I get white background when I try to store the image using save button)
Original Image is 5_20.jpg
Image after plotting is pat1.jpg
I want to store pat1.jpg without borders after plotting lines on it.
Can I know how can this be done?

Best Answer

Read about imwrite.