Commit Graph

12 Commits (b3061006c4f7a062c6e596a72ea221ad5238d1e0)

Author SHA1 Message Date
Simon McVittie a1fda0b516 Standardize on --long-option instead of -long-option
[[forum/refresh_and_setup]] indicates some confusion between --setup
and -setup. Both work, but it's clearer if we stick to one in
documentation and code.

A 2012 commit to [[plugins/theme]] claims that "-setup" is required
and "--setup" won't work, but I cannot find any evidence in ikiwiki's
source code that this has ever been the case.
2015-03-01 16:15:01 +00:00
Simon McVittie 105f285a63 Work around Debian #771047: use a non-blank SVG for the regression test
Inkscape loses the bounding box of a SVG with no content when it
converts it to EPS, and ImageMagick does not have a special case for
converting SVG to PNG with Inkscape in one step (which Inkscape can do);
it prefers to convert SVG to EPS with Inkscape, then EPS to whatever.
2014-11-26 11:10:44 +00:00
Simon McVittie 526a463ae5 img test: skip SVG tests if unsupported by Image::Magick 2014-09-16 10:00:27 +01:00
Amitai Schlair 04a10a180d Pass -templatedir to get this test passing again. 2014-09-15 22:16:39 -04:00
Simon McVittie d55d06ea88 use readfile() instead of reinventing it
This avoids potential action-at-a-distance from locally redefining $/
but never reaching the end of the redefinition's scope.
2014-09-01 08:40:54 +01:00
chrysn 0f9ea1f720 unit test for bugs/image_rescaling_distorts_with_small_pictures 2014-07-15 14:03:31 +02:00
chrysn a0a26d24f9 make img unittest easier to debug 2014-07-15 14:03:00 +02:00
chrysn a308b212ad 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.
2014-07-15 13:44:22 +02:00
chrysn 536a3364b2 drop unittest workaround for new perlmagick
just install -extra to make it work
2014-07-04 22:32:36 +02:00
chrysn c3019d94c6 drop unittest workaround for perlmagick
this was actually http://bugs.debian.org/753770
2014-07-04 22:32:24 +02:00
chrysn f9963b97c2 make unittest work with all all three packages that provide perlmagick 2014-07-04 22:32:13 +02:00
chrysn 4bd25423ac add unittests for img
this focuses on the features introduced in
http://ikiwiki.info/bugs/svg_and_pdf_conversion_fails/
2014-07-04 15:16:07 +02:00