Fixed issue #28 (again)
This commit is contained in:
parent
c4007beb2e
commit
ac4eb53029
2
Makefile
2
Makefile
|
@ -1,4 +1,4 @@
|
||||||
VERSION = git-20111111
|
VERSION = git-20111113
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -ansi -Wall -pedantic -O2
|
CFLAGS = -ansi -Wall -pedantic -O2
|
||||||
|
|
14
image.c
14
image.c
|
@ -311,16 +311,18 @@ bool img_load(img_t *img, const fileinfo_t *file) {
|
||||||
imlib_image_set_changes_on_disk();
|
imlib_image_set_changes_on_disk();
|
||||||
imlib_context_set_anti_alias(img->aa);
|
imlib_context_set_anti_alias(img->aa);
|
||||||
|
|
||||||
if ((fmt = imlib_image_format()) != NULL) {
|
if ((fmt = imlib_image_format()) == NULL) {
|
||||||
|
warn("could not open image: %s", file->name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#if EXIF_SUPPORT
|
#if EXIF_SUPPORT
|
||||||
if (STREQ(fmt, "jpeg"))
|
if (STREQ(fmt, "jpeg"))
|
||||||
exif_auto_orientate(file);
|
exif_auto_orientate(file);
|
||||||
#endif
|
#endif
|
||||||
#if GIF_SUPPORT
|
#if GIF_SUPPORT
|
||||||
if (STREQ(fmt, "gif"))
|
if (STREQ(fmt, "gif"))
|
||||||
img_load_gif(img, file);
|
img_load_gif(img, file);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
|
|
||||||
img->w = imlib_image_get_width();
|
img->w = imlib_image_get_width();
|
||||||
img->h = imlib_image_get_height();
|
img->h = imlib_image_get_height();
|
||||||
|
|
10
thumbs.c
10
thumbs.c
|
@ -253,10 +253,12 @@ bool tns_load(tns_t *tns, int n, const fileinfo_t *file,
|
||||||
imlib_context_set_image(im);
|
imlib_context_set_image(im);
|
||||||
imlib_context_set_anti_alias(1);
|
imlib_context_set_anti_alias(1);
|
||||||
|
|
||||||
fmt = imlib_image_format();
|
if ((fmt = imlib_image_format()) == NULL) {
|
||||||
/* avoid unused-but-set-variable warning */
|
if (!silent)
|
||||||
(void) fmt;
|
warn("could not open image: %s", file->name);
|
||||||
|
imlib_free_image_and_decache();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#if EXIF_SUPPORT
|
#if EXIF_SUPPORT
|
||||||
if (!cache_hit && STREQ(fmt, "jpeg"))
|
if (!cache_hit && STREQ(fmt, "jpeg"))
|
||||||
exif_auto_orientate(file);
|
exif_auto_orientate(file);
|
||||||
|
|
Loading…
Reference in a new issue