diff options
author | guilhem <guilhem@web> | 2015-06-06 12:51:08 -0400 |
---|---|---|
committer | admin <admin@branchable.com> | 2015-06-06 12:51:08 -0400 |
commit | f99850b5d3fc8d3c884f97c529881097342c8802 (patch) | |
tree | 244751ea8514aebb611c8d578ee0fd7f98bd8c8d | |
parent | 508bda205911058377f36fd4924b1e3f33914c71 (diff) | |
download | ikiwiki-f99850b5d3fc8d3c884f97c529881097342c8802.tar ikiwiki-f99850b5d3fc8d3c884f97c529881097342c8802.tar.gz |
-rw-r--r-- | doc/bugs/Colons___8216__:__8217___should_not_be_allowed_in_image_filenames.mdwn | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/bugs/Colons___8216__:__8217___should_not_be_allowed_in_image_filenames.mdwn b/doc/bugs/Colons___8216__:__8217___should_not_be_allowed_in_image_filenames.mdwn new file mode 100644 index 000000000..3ecde81f8 --- /dev/null +++ b/doc/bugs/Colons___8216__:__8217___should_not_be_allowed_in_image_filenames.mdwn @@ -0,0 +1,12 @@ +`IkiWiki::Plugin::img` appends `[$pagenumber]` to the filename to deal with multipage documents such as PDFs. +However, `Image::Magick` doesn't seem to like page selection for filenames containing a colon. This is also the case for imagemagick binaries: + + $ identify 'screenshot_2015-06-06_18:37:53.png' + screenshot_2015-06-06_18:37:53.png PNG 453x122 453x122+0+0 8-bit sRGB 11.2KB 0.000u 0:00.000 + $ identify 'screenshot_2015-06-06_18:37:53.png[0]' + identify: no decode delegate for this image format `37' @ error/constitute.c/ReadImage/501. + $ mv 'screenshot_2015-06-06_18:37:53.png' 'screenshot_2015-06-06_18-37-53.png' + $ identify 'screenshot_2015-06-06_18-37-53.png[0]' + screenshot_2015-06-06_18-37-53.png[0]=>screenshot_2015-06-06_18-37-53.png PNG 453x122 453x122+0+0 8-bit sRGB 11.2KB 0.000u 0:00.000 + +This might be an imagemagick bug, but it's also possible that colons are interpreted somehow. Anyway, to render such images properly in ikiwiki I had to remove the colons. An easy fix is to remove ‘:’ from `wiki_file_chars`, but this can break existing installations. A better solution would be to make `IkiWiki::Plugin::img` croak on such image filenames (which anyway are currently not rendered, but `Image::Magick`'s error message is quite cryptic). |