Zim

Code review comment for lp:~o-scholder/zim/pyzim-refactor

Revision history for this message
Olivier Scholder (o-scholder) wrote :

according to:
http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/png.html
480px is the default size for R.

I guess taking the 480px from the preference is for sure a good idea. So
that everybody can set to the value they like and work with it.

For the resizing, the problem is that each images are not created
on-the-fly by zim. They are converted into picture only once they are
edited. This will makes the auto-resizing to the screen size difficult. We
can implement that in the image module, but the problem with plots is that
they are usually made for a specific width/height ratio and thus automatic
resizing might become annoying.

For the image we have in the source (the saved txt files):

{{PATH-to-myimage.png?width=320}}

we can easily let the user write something like:

{{PATH-to-myimage.png?width=50%}}

and calculate the size of the image on the fly.

what do you think?

2013/12/3 Jaap Karssenberg <email address hidden>

> Looks very useful indeed - will merge it. Thanks!
>
> Only wondering about the default - maybe it make sense to not set a
> default (or make it a preference) and without default simply let R decide
> the size ?
>
> Btw. thinking about a way to automatically scale all images to window size
> in the page view, but will be later improvement.
> --
> https://code.launchpad.net/~o-scholder/zim/pyzim-refactor/+merge/197506
> You are the owner of lp:~o-scholder/zim/pyzim-refactor.
>

« Back to merge proposal