Overlay Images using ImageMagick (6.9.9.18) Version and Knitr (Version 3.4)
Posted: 2017-12-06T15:07:54-07:00
I am trying to create a report in R Markdown (Version 1.0.153, Mac OS X 10_13_1) with an html output to embed multiple MRI images of the brain using a vertical scrollbar, but also overlay certain images.
I am very new to coding so am not sure how difficult my problem is, or if the packages I'm currently using work together. I have viewed the following post https://www.imagemagick.org/discourse-s ... hp?t=31518 but still cannot find the answer.
Currently, I am using the function knitr::include_graphics to display my images when knit to HTML and css styling. I have 4 jpg images that I can currently scroll through using the following code in R markdown:
With the CSS style:
My question is, how can I use ImageMagick to overlay jpg 1+2, and jpg 3+4, while still maintaining the scroll function (between the 2 resultant images). Is this possible using both knitr (Version 3.4) and ImageMagick (Version 6.9.9.18)?
Any help is appreciated, as the link I've described previously was above my level of understanding. Thank you.
I am very new to coding so am not sure how difficult my problem is, or if the packages I'm currently using work together. I have viewed the following post https://www.imagemagick.org/discourse-s ... hp?t=31518 but still cannot find the answer.
Currently, I am using the function knitr::include_graphics to display my images when knit to HTML and css styling. I have 4 jpg images that I can currently scroll through using the following code in R markdown:
Code: Select all
<div class="vscroll-plot">
```{r echo=FALSE, out.width='100%', fig.align="center"}
library(knitr)
knitr::include_graphics('1.jpg')
knitr::include_graphics('2.jpg')
knitr::include_graphics('3.jpg')
knitr::include_graphics('4.jpg')
```
</div>
Code: Select all
.vscroll-plot {
width: 910px;
height: 600px;
overflow-y: scroll;
overflow-x: hidden;
}
Any help is appreciated, as the link I've described previously was above my level of understanding. Thank you.