InfoHeap
Tech tutorials, tips, tools and more
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Mac Command Line tutorials

  • Bulk convert jpeg files to png using sips on mac
  • Custom terminal tab title and ssh on mac
  • How to convert text to speech on Mac using command line utility say
  • How to join multiple pdf files on Mac
  • How to use qpdf to add/remove password from pdf on mac
  • Install redis on Mac
  • Mac - find which process is listening on a port
  • Mac - hide and unhide a file or directory
  • Mac - open a terminal from a folder
  • Mac - print java home on command line
  • Mac - search files on command line using mdfind
  • Mac command line convert svg to png
  • Mac command line utility open - some handy tips for better productivity
  • Mac terminal - how to close shell on exit
  • mac pkgutil - quick start guide
 
  • Home
  • > Tutorials
  • > Mac
  • > Mac Command Line

Mac command line convert svg to png

on Oct 29, 2022

convert utility on Mac (it comes with imagemagick package) can be used to convert an svg to png. Here is an example.

SVG file (test.svg)

<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="720">
<rect width="1280" height="720" style="fill:green;" />
<text x="120" y="160" style="font-size:100px;fill:white;">Hello</text>
</svg>

Run the following command to create test.png from above svg

convert test.svg test.png

We can also use -resize in case we want to reduce size of original image. Here is the command to reduce original image by 50% (keeping aspect ratio same):

convert -resize 50% test.svg test.png

Here is the outcome from above command:

Suggested posts:

  1. How to resize image (including animated gif) using Image magick convert
  2. How to convert text to speech on Mac using command line utility say
  3. Command line – scale a video using ffmpeg
  4. How to compress screenshot images using imagemagick convert
  5. Imagemagick – how to create animation on command line
  6. How to crop an image using imagemagick convert
  7. Mac command line utility open – some handy tips for better productivity
  8. Mac – search files on command line using mdfind
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Uncategorized | Tagged Mac Command Line

Follow InfoHeap

facebook
twitter
googleplus
  • Browse site
  • Article Topics
  • Article archives
  • Recent Articles
  • Contact Us
  • Omoney
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries

Copyright © 2023 InfoHeap.

Powered by WordPress