summaryrefslogtreecommitdiff
path: root/src/generators.c
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2011-06-04 20:10:34 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2011-06-04 20:10:34 +0200
commit67735dc85fc4a25dcc3e0b30420b3ad5a6ac1c9f (patch)
tree91407fb189dd2a97283c844297d7b6dab0c19152 /src/generators.c
parentee24863518448604b5600ab1e426d818975a76bb (diff)
downloadcataract-67735dc85fc4a25dcc3e0b30420b3ad5a6ac1c9f.tar.xz
Autorotate images according to EXIF Orientation info
This comes with a cost of decoding full image when only getting image size.
Diffstat (limited to 'src/generators.c')
-rw-r--r--src/generators.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/generators.c b/src/generators.c
index b1c7b44..d7d180b 100644
--- a/src/generators.c
+++ b/src/generators.c
@@ -167,7 +167,7 @@ generate_image (TGallerySetup *setup,
}
/* Resize image */
else {
- get_image_sizes (img_src, &img_w, &img_h);
+ get_image_sizes (img_src, &img_w, &img_h, setup->autorotate);
if (img_w > 0 && img_h > 0) {
stats_images_inc ();
@@ -196,7 +196,7 @@ generate_image (TGallerySetup *setup,
quality = item->quality;
/* Perform resize and strip */
- if (! resize_image (img_src, img_dst, img_w, img_h, quality, is_thumbnail, setup->squared_thumbnail_type))
+ if (! resize_image (img_src, img_dst, img_w, img_h, quality, is_thumbnail, setup->squared_thumbnail_type, setup->autorotate))
log_error ("generate_image: error resizing image %s\n", img_src);
} else {
log_error ("generate_image: image %s sizes are %lux%lu\n", img_src, img_w, img_h);
@@ -466,7 +466,7 @@ write_html_album (TGallerySetup *setup,
img_thumb_w = img_thumb_h = 0;
get_image_paths (setup, items, item, i, path_info, thumb_image_size, NULL, &s2, &s3);
if (s2 != NULL)
- get_image_sizes (s2, &img_thumb_w, &img_thumb_h);
+ get_image_sizes (s2, &img_thumb_w, &img_thumb_h, setup->autorotate);
if (setup->squared_thumbnail_type != THUMBNAIL_SQUARE_TYPE_NONE || img_thumb_w == img_thumb_h)
s1 = "IMG_LIST_SQUARED";
@@ -681,10 +681,10 @@ write_html_image (TGallerySetup *setup,
}
/* Retrieve image sizes of preview and original image */
- get_image_sizes (img_dst, &img_w, &img_h);
+ get_image_sizes (img_dst, &img_w, &img_h, setup->autorotate);
image_fullsize = ! theme_size_is_original && img_orig_dst != NULL && ! IS_NOFULLSIZE (item, parent_items, setup);
if (image_fullsize) {
- get_image_sizes (img_orig_dst, &img_orig_w, &img_orig_h);
+ get_image_sizes (img_orig_dst, &img_orig_w, &img_orig_h, setup->autorotate);
g_hash_table_replace (defines, g_strdup ("HAS_FULLSIZE"), g_strdup (""));
}