将png、jpg图片转为eps格式

  • Post author:
  • Post category:其他


由于要写论文,如Elsevier中对图片的要求如下:只能是eps或jpg,对于jpg的要求也太多了吧,所以干脆全部搞成eps得了,但是如何操作呢,下面就详细介绍。

在这里插入图片描述

首先说一个

错误

做法:有的小伙伴直接将图片后缀改了,这个是不对的,虽然你可以打开,但是LaTeX不能识别

对于要将图片格式转为eps的,基本都是在

LaTeX

中写论文需要的,所以这里默认你已经安装了LaTeX环境,这种方法就是利用latex已经提供的工具 bmeps,不需要你额外下载或安装任何软件。具体步骤如下:

1、通过打开cmd(在电脑下方直接搜索即可,或者win键+r,然后搜索cmd),输入:

在这里插入图片描述

bmeps -h

这时就可以查看当前安装的版本信息和操作,如下所示:

 Options
      -------

      -p <pslevel>           select one of the following
         1                   (PS level 1)
         2                   (PS level 2 = default)
         3                   (PS level 3)
      -b                     BoundingBox file only
      -c                     turns color printing on
      -g                     turns color printing off (default)

      -e <encoding>          combine the follogin characters to specifiy
         8                   ASCII-85-encoding instead of ASCII-Hex
         r                   runlength encoding
         f                   flate encoding

      -t <filetype>          choose one of the following
         png
         jpg
         pnm

      -d                     draft mode only
         Draft mode means the program reads only header information
         from the bitmap file and prints a dummy image.

      -a <alphaoptions>
         o                   alpha channel is opacity, not transparency
         t                   alpha channel is transparency, not opacity
         l                   alternated transparency trigger level
         m                   mix foreground- and background color
         sd,d,d              specify background color i.e. s128,128,255
         PNG supports transparency channels, having values from
         0 ... 2^n-1. EPS supports simple yes/no decisions to mask
         pixels, so the alpha channels value must be mapped to
         "use pixel" or "mask pixel". The standard behaviour is
         to mask only pixels which have no opacity at all.
         The alternated trigger level uses only pixels having full
         opacity.

      -s                     print DSC comments

      -o                     use showpage operator

      -u                     undefine /pstr and /inputf, use
                             separated dictionary

      -r                     force garbage collection via "1 vmreclaim"

      -q                     use resolution information from the PNG file's
                             pHYs chunk (if available).

注意其中的 -c 参数,默认 -g 是进行无彩色转换,所以如果你想要转换成彩色的,需要使用该选项。

其中的-t 参数是用来指定输入文件的类型,也可以不设置,程序会根据输入文件后缀自动识别。

2、打开自己图片所在的文件夹位置,如果是c盘,直接用 cd + 路径名,如: cd C:\Users\ABC\Desktop\images ,如果是d盘,则需先用指令 d: ,然后在用 cd指令

3、转换图片,如果是

彩色

图片

bmeps -c example.jpg example.eps

example.jpg就是原图片名称



版权声明:本文为caoyuan666原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。