Problem!
http://www.nucia.nl/forum/showthread.php?p=222209 (post #4 and #10)
As u can see, the picture isn't resize properly. It looks like the resize to keep the height-width-ratio. Can somebody confirm this?
That shouldn't happen because I gave up a MAXIMUM height and WIDTH in my ACP. So it shouldn't be wider then X, even if that means the picture isn't shown "nice" anymore.
EDIT:
I fixed it jusing this code in the JS file:
Code:
NcodeImageResizer.prototype.scale = function() {
var cs = 0;
cs += NcodeImageResizer.MAXWIDTH > 0 && this.originalWidth > NcodeImageResizer.MAXWIDTH ? 1 : 0;
cs += NcodeImageResizer.MAXHEIGHT > 0 && this.originalHeight > NcodeImageResizer.MAXHEIGHT ? 2 : 0;
if (cs == 3) cs -= this.originalWidth / NcodeImageResizer.MAXWIDTH > this.originalHeight / NcodeImageResizer.MAXHEIGHT ? 2 : 1;
switch (cs) {
case 1:
resized = true;
this.img.width = NcodeImageResizer.MAXWIDTH;
this.img.height = (NcodeImageResizer.MAXWIDTH / this.originalWidth) * this.originalHeight;
break;
case 2:
resized = true;
this.img.height = NcodeImageResizer.MAXHEIGHT;
this.img.width = (NcodeImageResizer.MAXHEIGHT / this.originalHeight) * this.originalWidth;
break;
}
this.warning.width = this.img.width;
this.warning.onclick = function() { return this.resize.unScale(); }