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

  • Home
  • SEARCH
  • 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 7658553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:13:01+00:00 2026-05-31T13:13:01+00:00

I have an place where i upload an SVG file using paperclip, and get

  • 0

I have an place where i upload an SVG file using paperclip, and get converted it to PNG with the same dimension.
When it gets converted, my final PNG output was having white background, when my uploaded SVG have transparent background.

Tried with paperclip convert_options, but it was not providing proper output, such as the image have some pixels of white all over the borders.

Example, trans << “-fuzz 0% -transparent ‘rgb(255,255,255)'”

Finaly got it working with an after_save method which uses inkscape to convert my SVG to PNG and replace the PNG generated by paperclip.

Example, inkscape –export-png=OUTPUT.png INPUT.svg

But this looks like a double work, to use paperclip(IM) and also inkscape.
So, is there any other way to get proper PNG using paperclip with transparent background when my uploaded SVG has transparent background.

Thanks in advance,

  • 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-05-31T13:13:02+00:00Added an answer on May 31, 2026 at 1:13 pm

    Finaly got the issue sorted myself… 🙂
    It was my bad, as i didn’t see “-layers merge” getting adding to my paperclip command from initializers…

    Paperclip::Attachment.default_options[:convert_options] = { :all =>
    ‘-layers merge’ }

    Finally got it worked with paperclip(IM) itself…
    Hope it will help someone….. 🙂

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

Sidebar

Related Questions

So I have ajax file upload partial (using Jquery Form plugin), it's working perfectly,
We have a process in place to upload a file nightly to a partner
I have one requirement that i have to place the log file in the
I have a check in place via php to determine if the file is
I have a question. I have a script that handles file upload, and after
Possible Duplicate: upload a file to server without using a form? POSTing a file
I have to upload a file via FTP to ftp://ftp.remoteServer.com My root directory on
I have PHP page where users can upload photos (using Ajax & PHP script).
i have a map of the US: http://upload.wikimedia.org/wikipedia/commons/a/a5/Map_of_USA_with_state_names.svg i am trying to embed this
I have a tab delimited text file that I need to upload to a

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.