summaryrefslogtreecommitdiff
path: root/src/generators.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/generators.c')
-rw-r--r--src/generators.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/src/generators.c b/src/generators.c
index c9fc4ef..95bed37 100644
--- a/src/generators.c
+++ b/src/generators.c
@@ -152,7 +152,7 @@ generate_image (TGallerySetup *setup,
if (item->force_fullsize || setup->override_nofullsize || (items->fullsize && ! item->force_nofullsize) ||
(! item->force_nofullsize && ! items->nofullsize && ! setup->nofullsize))
orig_dst = g_build_filename (path_info->dest_dir, setup->img_orig_dir, s1, NULL);
- res = (! update_when_necessary) || needs_update (thumb_src_full, thumb_dst) ||
+ res = (! update_when_necessary) || (! item->hidden && needs_update (thumb_src_full, thumb_dst)) ||
(items->type == GALLERY_TYPE_ALBUM && (needs_update (img_src_full, big_dst) || (orig_dst && needs_update (img_src_full, orig_dst))));
g_free (s1);
@@ -169,18 +169,20 @@ generate_image (TGallerySetup *setup,
get_image_sizes (thumb_src_full, &thumb_w, &thumb_h);
if (thumb_w > 0 && thumb_h > 0) {
- /* Squared thumbnails */
- if (setup->squared_thumbnail_type != THUMBNAIL_SQUARE_TYPE_NONE) {
- thumb_w = setup->thumbnail_square_size;
- thumb_h = setup->thumbnail_square_size;
- } else
- /* Portrait / Landscape thumbnails */
- if (thumb_h > thumb_w)
- calculate_sizes (setup->thumbnail_portrait_width, setup->thumbnail_portrait_height, &thumb_w, &thumb_h);
- else
- calculate_sizes (setup->thumbnail_landscape_width, setup->thumbnail_landscape_height, &thumb_w, &thumb_h);
- if (! resize_image (thumb_src_full, thumb_dst, thumb_w, thumb_h, setup->thumbnail_quality, TRUE, setup->squared_thumbnail_type))
- log_error ("generate_image: error resizing thumbnail %s\n", thumb_src_full);
+ if (! item->hidden) {
+ /* Squared thumbnails */
+ if (setup->squared_thumbnail_type != THUMBNAIL_SQUARE_TYPE_NONE) {
+ thumb_w = setup->thumbnail_square_size;
+ thumb_h = setup->thumbnail_square_size;
+ } else
+ /* Portrait / Landscape thumbnails */
+ if (thumb_h > thumb_w)
+ calculate_sizes (setup->thumbnail_portrait_width, setup->thumbnail_portrait_height, &thumb_w, &thumb_h);
+ else
+ calculate_sizes (setup->thumbnail_landscape_width, setup->thumbnail_landscape_height, &thumb_w, &thumb_h);
+ if (! resize_image (thumb_src_full, thumb_dst, thumb_w, thumb_h, setup->thumbnail_quality, TRUE, setup->squared_thumbnail_type))
+ log_error ("generate_image: error resizing thumbnail %s\n", thumb_src_full);
+ }
} else {
log_error ("generate_image: thumbnail %s sizes are %lux%lu\n", thumb_src_full, thumb_w, thumb_h);
}