Commit Graph

10 Commits (edbc54ec6e88bf300239a4c4a685cfab5e34ca38)

Author SHA1 Message Date
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