-
Notifications
You must be signed in to change notification settings - Fork 40
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
cropped raster image #64
Comments
Simpler reprex: url1 <- "https://upload.wikimedia.org/wikipedia/commons/6/68/Solid_black.png"
url2 <- "https://upload.wikimedia.org/wikipedia/commons/thumb/4/47/PNG_transparency_demonstration_1.png/280px-PNG_transparency_demonstration_1.png"
img <- png::readPNG(curl::curl_fetch_memory(url2)$content)
htmlSVG({
plot.new()
rasterImage(img, 0.25, 0.25, 0.75, 0.75)
rect(0.25, 0.25, 0.75, 0.75, border = "red", lwd = 2)
}) Interestingly, the problem doesn't seem to occur with the solid black png |
@davidgohel given that this only happens with some images, is it possible it's a bug in gdtools? |
lionel-
added a commit
to lionel-/gdtools
that referenced
this issue
Oct 21, 2016
Fixes r-lib/svglite#64 Fixes bug in transparency handling
Fixed in davidgohel/gdtools#32 |
lionel-
added a commit
to lionel-/svglite
that referenced
this issue
Oct 24, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When including a rastergrob in a plot, it displays without issue in Rstudio. However, much of the image is cropped when outputting the plot with
svglite
.Reproducible example:
Output in Rstudio:

Output from svglite:

The text was updated successfully, but these errors were encountered: