Sorry, but I cannot reproduce the problem with the latest CRAN version of shiny:
library(shiny)
runApp(list(
ui = fluidPage(imageOutput('foo', width = 200, height = 100)),
server = function(input, output) {
output$foo = renderImage({
f = tempfile(fileext = '.png')
png(f, width = 400, height = 200)
plot(cars)
dev.off()
list(src = f)
})
}
))
This gives me <div id="foo" class="shiny-image-output" style="width:
200px ; height: 100px"></div> as expected.
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-pc-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_0.10.0
loaded via a namespace (and not attached):
[1] bitops_1.0-6 caTools_1.17 digest_0.6.4 htmltools_0.2.4
[5] httpuv_1.3.0 Rcpp_0.11.2 RJSONIO_1.2-0.2 tools_3.1.1
[9] xtable_1.7-3
Regards,
Yihui
On Tue, Jul 22, 2014 at 2:01 AM, Sigbert Klinke
<
sig...@wiwi.hu-berlin.de> wrote:
> Hi,
>