Skip to content
This repository has been archived by the owner on Jan 16, 2023. It is now read-only.

Commit

Permalink
Fixed thumbnail creation for files with big aspect ratio factor; fixe…
Browse files Browse the repository at this point in the history
…s issue #175
  • Loading branch information
xyb3rt committed Sep 29, 2014
1 parent 0e4db69 commit 390d771
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion thumbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ Imlib_Image tns_scale_down(Imlib_Image im, int dim)

if (z < 1.0) {
imlib_context_set_anti_alias(1);
im = imlib_create_cropped_scaled_image(0, 0, w, h, z * w, z * h);
im = imlib_create_cropped_scaled_image(0, 0, w, h,
MAX(z * w, 1), MAX(z * h, 1));
if (im == NULL)
die("could not allocate memory");
imlib_free_image_and_decache();
Expand Down

0 comments on commit 390d771

Please sign in to comment.