Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7901875
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:20:45+00:00 2026-06-03T09:20:45+00:00

After having spent two days attempting to rasterize jpeg’s from SVG strings using ImageMagick

  • 0

After having spent two days attempting to rasterize jpeg’s from SVG strings using ImageMagick I have finally given up.

Although I managed to get the actual conversion working fine it seems Imagemagick cannot properly convert the transform/rotate features correctly when rendering the image, leaving the output different to the original SVG.

Having researched further it appears that this is a known issue and that ‘Inkscape’ is the best method to use for converting SVG into jpeg/png in PHP.

The problem is that my SVG data is sent to my PHP script via JSON. How do I get a blob or string into the Inkscape command line in order to have it converted?

Many thanks for any suggestions.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:20:46+00:00Added an answer on June 3, 2026 at 9:20 am

    If you have an SVG string, and you’re sending it from the browser to the server via AJAX, you’ll need to write it to a temp file, so it can be referenced from the Inkscape command line. You can’t render to JPEG using the Inkscape command line, but you can render to PNG easily, and if you really need a different format, of course you can convert using ImageMagick subsequently.

    You’ll need something like:

    /path/to/inkscape \
        --without-gui \
        --export-png=/path/to/output.png \
        /tmp/file/input.svg
    

    If you are accepting full/partial SVG input from the user, bear in mind there are a good number of security issues you need to bear in mind. Happy to expand on this if required.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've spent two days on this and have gotten nowhere. I'm trying to use
I've spent two days trying to make a login/logout panel in PHP. I'm using
After having looked at each of these two projects, it seems that both are
After having converted a messed up XML using regex, I now need to change
We're having a bizarre problem with Indy10 where two large strings (a few hundred
After developing software for about 5 years now, I have spent probably atleast 20%
my app is nearly finished but a leak has appeared. After having spent an
Possible Duplicate: Tips for an iOS developer to learn Mac programming? After having spent
after having spent few months in trying to master the syntax and rules, I
I'm having trouble saving xml files after making changes to them. I've spent all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.