如何导出非模糊eps图像? [英] How to export non-blurry eps images?

查看:106
本文介绍了如何导出非模糊eps图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用eps格式在Matlab中导出图像,但是它可以使图像平滑. Matlab不会使用其他格式(例如png)模糊图像.我想知道如何导出eps格式的非模糊图像.这是使用png生成的图像:

I'm exporting an image in Matlab using the eps format, but it smooths the image. Matlab does not blur the image using other formats such as png. I would like to know how to export a non-blurry image with eps format. Here is the resulting image using png:

这是使用eps生成的图像:

And here is the resulting image using eps:

推荐答案

更新:

该问题在Mac上是可重现的,问题出在eps渲染器而不是MATLAB.例如,保存imagesc(rand(20))并使用Preview和GSview查看将导致以下结果:

UPDATE:

The problem is reproducible on a Mac, and the issue is with the eps renderer rather than MATLAB. For e.g., saving imagesc(rand(20)) and viewing with Preview and GSview results in the following:

很显然,信息不会丢失.只是某些EPS查看器无法正确解释/读取它.解决方案很简单:使用GSview查看eps图像.您可以从此处

Clearly, the information is not lost. It is just not interpreted/read correctly by some EPS viewers. The solution is simple: use GSview to view your eps images. You can download it from here

尤其是在Mac上,如果最终应用程序是latex/pdflatex,则必须将其显式设置为使用GS/GSview,因为否则,它将默认使用Quartz引擎,该引擎已被移植到操作系统中.

On Macs especially, if your end application is latex/pdflatex, you will have to explicitly set it to use GS/GSview, because otherwise, it will default to the Quartz engine, which is baked into the OS.

我无法重现您描述的行为.这是我在WinXP 32位上使用R2010b进行测试的代码:

I am unable to reproduce the behavior your described. Here is the code I used, tested using R2010b on WinXP 32-bit:

M = fspecial('gaussian',[20 20],5);
imagesc(M)
print('-dpng','a.png')
print('-depsc2','b.eps')

a.png

也许这是您的EPS查看器出现的问题...

Perhaps this is an issue with your EPS viewer...

这篇关于如何导出非模糊eps图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆