【发布时间】:2012-12-31 10:25:50
【问题描述】:
我正在使用以下脚本将图像转换为 EPS 文件。
%% Image 2 eps file.
% - img: the image.
% - eps: eps filename.
function Image2Eps(img, eps)
imshow(img,'border','tight','InitialMagnification',100);
print(gcf,'-depsc',eps);
end
生成的文件几乎将图像紧紧地绑定在一起。 但是在顶部和右侧总是会留下一个小的边距。 如何使EPS文件与位图图像大小一致?
【问题讨论】:
-
你为什么使用 Matlab 来完成这项任务?为什么不使用
gs? -
这是文档中的相关评论,也许它有帮助:
Note: There can still be a border if the image is very small, or if there are other objects besides the image and its axes in the figure.除了防止它发生之外,您还可以在之后删除边框? -
Shai:你能提供一些关于使用ghostscript将位图图像转换为eps的更多想法吗?用于演示的命令行?