Base64 jpg to base64 Png in Ruby
问题 I'm working with base64 files and i would like to convert a base64jpg image in a base64png image. Is there a way to do it? The reason is i'm using rsvg-convert to convert svg files into png files, but when i have a base64jpg in my svg, it's not working, But it works with base64 files. 回答1: In ImageMagick, this works for me. Create JPG base 64 file: convert rose: rose.jpg convert rose.jpg inline:rose_base64jpg The text file rose_base64jpg shows: data:image/jpeg;base64,/9j