Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Color changed in rsvg_png #46

Open
zhangnan0107 opened this issue Nov 26, 2024 · 4 comments
Open

Color changed in rsvg_png #46

zhangnan0107 opened this issue Nov 26, 2024 · 4 comments

Comments

@zhangnan0107
Copy link

zhangnan0107 commented Nov 26, 2024

Hi,

Thanks for developing the convenient tool. I would like to ask is it possible to keep the colors when converting svg to png (or other formats). I tried with one svg file where I used pink for data tracks, however, it became blue after conversion.

Thank a lot,
Nan

@jeroen
Copy link
Member

jeroen commented Nov 26, 2024

Can you include example code and file please.

@zhangnan0107
Copy link
Author

Sure.

Here is the svg plot I wanted to convert:
image

Here is the png file after conversion:
image

Here is the code I used:

svg_file <- "igv.svg"

png_file <- "igv.png"

rsvg_png(svg_file,png_file)

Let me know if you need the content within the svg file. Thanks a lot!

@jeroen
Copy link
Member

jeroen commented Dec 4, 2024

Yes we need the svg file. Does the same problem happen with magick::image_read() ?

@zhangnan0107
Copy link
Author

Here is the svg file, and yes, I tried once last week with magick::image_read() to save in tiff format and the color also changed.

PMD_ref_igv

Let me know if the file is not attached successfully : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants