diff options
Diffstat (limited to 'src/loader.c')
-rw-r--r-- | src/loader.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/loader.c b/src/loader.c index 35e7450..e7d0321 100644 --- a/src/loader.c +++ b/src/loader.c @@ -227,13 +227,15 @@ static void *bg_new_img(void *data) } else { /* Future TODO: If we load image line-by-line we could stop loading large * ones before wasting much more time/memory on them. */ + + int flags = (fmt == FIF_JPEG) ? JPEG_EXIFROTATE : 0; FIBITMAP *image; if(from_stdin) { pthread_mutex_lock(&ldr->lock); - image = FreeImage_LoadFromMemory(fmt, ldr->fi_buffer, 0); + image = FreeImage_LoadFromMemory(fmt, ldr->fi_buffer, flags); pthread_mutex_unlock(&ldr->lock); } else { - image = FreeImage_Load(fmt, path, 0); + image = FreeImage_Load(fmt, path, flags); } if(!image) { error_occurred(ldr); |