nsxiv390d771
Fixed thumbnail creation for files with big aspect ratio factor; fixes issue #175
+2 −1
1 file changed
- M thumbs.c +2 −1
| @@ -226,7 +226,8 @@ Imlib_Image tns_scale_down(Imlib_Image im, int dim) | |||
| 226 | 226 | ||
| 227 | 227 | if (z < 1.0) { | |
| 228 | 228 | imlib_context_set_anti_alias(1); | |
| 229 | − | im = imlib_create_cropped_scaled_image(0, 0, w, h, z * w, z * h); | |
| 229 | + | im = imlib_create_cropped_scaled_image(0, 0, w, h, | |
| 230 | + | MAX(z * w, 1), MAX(z * h, 1)); | |
| 230 | 231 | if (im == NULL) | |
| 231 | 232 | die("could not allocate memory"); | |
| 232 | 233 | imlib_free_image_and_decache(); | |