Skip to main content

a simple image process tool.

Project description


a simple image process tools.


pip install ximage


the INPUTIMGS means you can input as many image files as you like.

resize image

Usage: ximage resize [OPTIONS] INPUTIMGS...

  resize your image, width height you must give one default is zero.

  -V, --verbose      print verbose info
  --width INTEGER    the output image width
  --height INTEGER   the output image height
  --outputdir TEXT   the image output dir
  --outputname TEXT  the image output name
  --help             Show this message and exit.

convert image format

you may need install the inkscape software for svg convertation.

Usage: ximage convert [OPTIONS] INPUTIMGS...

  support image format:

    - pillow : png <-> jpg <-> gif <-> eps <-> tiff <-> bmp <-> ppm

    - inkscape: svg -> pdf | png | ps | eps

    - pdftocairo: pdf -> png | jpeg | ps | eps | svg

  -V, --verbose                   print verbose info
  --dpi INTEGER                   the output image dpi
  --format TEXT                   the output image format
  --outputdir TEXT                the image output dir
  --outputname TEXT               the image output name
  --pdftocairo-fix-encoding TEXT  In Windows,the pdftocairo fix encoding
  --overwrite / --no-overwrite    overwrite the output image file, default is

  --transparent                   pdf convert to png|tiff can turn transparent

  --help                          Show this message and exit.



  • add tests
  • ximage convert add --transparent option used by pdftocairo.exe
  • code refine.


doc refine.


fix a bug: convert_image output_dir not return correctly.


  1. fix pdftocairo.exe in windows can not handle the chinese problem. 中文用户经过测试需要加上如下encoding参数:--pdftocairo-fix-encoding=gb18030 【现在似乎又没这个问题了,似乎win10更新了能够正确处理中文文件名了】


  1. change use pdf2ppm to pdftocairo, it can convert pdf to png|jpeg|svg etc.
  2. the pip installation will make sure you have installed the pillow module.
  3. the pip installation in windows will check is there have pdftocairo.exe, if can not found , program will copy the pdftocairo.exe to the python scripts folder.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ximage-0.3.1.tar.gz (1.7 MB view hashes)

Uploaded source

Built Distribution

ximage-0.3.1-py3-none-any.whl (9.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page