summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/generators.c2
-rw-r--r--templates/default.xml6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/generators.c b/src/generators.c
index 2483175..a2f7a65 100644
--- a/src/generators.c
+++ b/src/generators.c
@@ -230,7 +230,7 @@ generate_image (TGallerySetup *setup,
res = res || needs_update (img_src, img_dst);
if (! query_update) {
/* Copy the source file */
- if ((is_preview && item->preview) || (is_original && image_size->no_resize)) {
+ if (image_size->no_resize && ((is_preview && item->preview) || is_original)) {
if (! copy_file (img_src, img_dst))
log_error (" Error copying image %s to %s\n", img_src, img_dst);
}
diff --git a/templates/default.xml b/templates/default.xml
index d2b0b63..318531c 100644
--- a/templates/default.xml
+++ b/templates/default.xml
@@ -34,6 +34,12 @@
<landscape w="1067" h="600" />
<portrait w="800" h="800" />
<quality value="95" />
+ <!-- Similar to the "original" size where the image has to be always supplied,
+ the image won't get resized only when an image file is supplied by the
+ <item preview="..."> tag. Otherwise this tag is ignored and image will
+ be resized from the "original" size (backwards compatibility).
+ This rule applies also for any other optional image sizes. -->
+ <no_resize />
</size>
<!-- Thumbnail section is mandatory. -->