img: raise an error if we cannot find the image's size This happens for PDFs without ghostscript installed, for instance.
show resized img in preview using data: urls in analogy to sparklines, this renders scaled imgs to data:img/...;base64,... urls in preview mode. if the image is already present on the server (eg because it was not just inserted), the already rendered image is referenced instead.
img plugin: split resizing calculations and actual resizing there is now a size calculating part (which chooses a final size) and a scaling part (which triggers if the sizes calculated by the former indicate a downscaling). this solves the issue of unproportional upscalings (bugs/image_rescaling_distorts_with_small_pictures). also, "small" pdf files (or pdf files without explicit size settings), which would not be converted under the old mechanism, now get rendered to pngs. this commit affects a unit test: while svgs were previously unconditionally rendered to pngs, this now only happens on downscaling. this is intentional -- while a small version of an svg graphic is likely to be more compact when rendered (eg as a preview), a large version would not have that benefit, and why convert something that browsers basically can show and be inconsistend with how other images are handled. the new unit test simply makes the original svg larger to check for the same behaviros as before.
add pagenumber parameter this allows picking a page from a pdf. also, this enhances performance greatly when rendering pdfs, as only the first page is rasterized. (otherwise, imagemagick would treat the pdf as a list of images, work with all of them, until finally only the first page gets saved). the default parameter of 0 will select the single image contained in typical image files anyway, so no specialcasing between single- and multifile containers is needed.
add pdf support to the img directive this is trivial as pdf is supported by imagemagick, and just needs an explicit mention to enable conversion.
set the file type parameter after reading the image imagemagick, when reading an image, sets its magick parameter to indicate the file type, overriding the explicitly set file type for output if it is set at creation. as a result, previously (with graphicsmagick-libmagick-dev-compat 1.3.18-1 providing Image::Magick), svg output files were not png, neither svg, but mvg (imagemagick vector graphics).
cleanup now unused setting
Always use true image size
img: Generate png format thumbnails for svg images. Imagemagick does not generate svg images very well, but it can convert them to png quite well. For browsers that don't yet support displaying svg, this also provides a workaround; just scale the svg down to get a png. But the workaround is partial, since scaling the image larger, or leaving it the same size will cause the original svg to be displayed. Since browsers are actively improving svg support, this is good enough for me.
use one-parameter form of urlto
Use local paths for most references to pages
img: If a class is specified, don't also put the img in the img class.
img: Add a margin around images displayed by this directive. Particularly important for floating images, which could before be placed uncomfortably close to text.
avoid ugly warning if size="" is specified
img: Support hspace and vspace attributes.
improve preview mode comments
img: Fill in missing height or width when scaling image.
setup file ordering
img: Fix a bug that could taint @links with undef values.
only use css alignment stuff for table This way users can use all the other alignment values when not including a caption. Also, it will work without the standard style, and I don't have to worry about regressions this way.