a minor fix to resizing images
This commit is contained in:
parent
7853ba8d3f
commit
074723ae51
|
@ -6,7 +6,7 @@ setimagesize(int width, int height)
|
||||||
int oiw = 0;
|
int oiw = 0;
|
||||||
|
|
||||||
// this makes sure we cannot scale the image up or down too much
|
// this makes sure we cannot scale the image up or down too much
|
||||||
if ((!image && height < imageheight) || (!image && width < imagewidth) || width > mw || hideimage) return;
|
if ((!image && height < imageheight) || (!image && width < imagewidth) || (width < 0) || width > mw || hideimage) return;
|
||||||
|
|
||||||
// original width/height
|
// original width/height
|
||||||
oih = imageheight;
|
oih = imageheight;
|
||||||
|
@ -86,7 +86,7 @@ drawimage(void)
|
||||||
loadimagecache(sel->image, &width, &height);
|
loadimagecache(sel->image, &width, &height);
|
||||||
} else if ((!sel || !sel->image) && image) { // free image
|
} else if ((!sel || !sel->image) && image) { // free image
|
||||||
cleanupimage();
|
cleanupimage();
|
||||||
} if (image && longestedge) { // render the image
|
} if (image && longestedge && width && height) { // render the image
|
||||||
// rotate and flip, will return if we don't need to
|
// rotate and flip, will return if we don't need to
|
||||||
rotateimage();
|
rotateimage();
|
||||||
flipimage();
|
flipimage();
|
||||||
|
|
Loading…
Reference in a new issue