tags:

views:

107

answers:

1

Hello, There have been some posts here regarding image processing but I don't think that this question has been asked here. I have Matlab but not the image processing toolbox. I've tried to compress a figure and I want to save the result in the eps format. I have looked at imwrite but it doesn't have the eps format. Any suggestions?

Thanks a lot...

A: 

for b&w eps

 saveas(fig, 'myfile.eps', 'eps')

for color

saveas(fig, 'myfile.eps', 'eps2c')

documentation:

SAVEAS(H,'FILENAME','FORMAT') Will save the Figure or Simulink block diagram with handle H to file called FILENAME in the format specified by FORMAT. FORMAT can be the same values as extensions of FILENAME.

Additional FORMAT options include devices allowed by PRINT.

type help print for a list of drivers. You don't need the '-d' part when calling saveas.

if your question is how to display an image in the figure window without using imshow, either image or imagesc will work (if imagesc, convert to a double first)

imagesc(double(im)); colormap gray; axis equal
saveas(gcf, 'myimage.eps', 'eps')
Marc
Thanks a lot. I needed your "second" answer and I added axis off; axis image to get the image only. Some good information also here: http://www.mathworks.com/access/helpdesk/help/techdoc/ref/image.html
yCalleecharan

related questions