天天看點

linux convert 轉化圖檔格式

摘要

上回用到LINKVIEW可視化染色體共線性,最後的PNG圖檔分辨率即使加了對應的調整參數(dpi)仍不高,軟體先生成SVG再轉化為PNG,是以可以自行轉化為高品質的PNG。

找了一圈,linux上的ImageMagick的convert指令可以滿足場景。

Use ImageMagick® to create, edit, compose, or convert digital images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, GIF, WebP, HEIC, SVG, PDF, DPX, EXR and TIFF. ImageMagick can resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

使用

density也就是dpi

# -density就是dpi
convert -density 600 chr16.svg chr16.png
# 相同地,轉化格式也是這個指令格式,其他格式轉化也可以
convert chr16.png chr16.jpeg
           

繼續閱讀