|
#1
|
|||
|
|||
|
12CropImage
There were two things I didn't like about 12CropImage as it came:
- the square couldn't get bigger than the width of the image (good), but it could get bigger then the height of the image (or it was the other way around); - the square couldn't get as small as my thumbnails (while I guess this is to minimize quality loss by re-compression, I've set quality so low already that it doesn't really matter to me) I thought maybe somebody would be interested to know how to change this. - in 12cropimageinc.php I set $imgProp = 1; (instead of 0.4 or so) - in 12cropimageincscript.php I changed the first rimg.cr-2 of the last else statement to rimg.cr and the second rimg.cr-2 to rimg.cb: old: Code:
else {
if ((obj.cr < (rimg.cr-2))&&
(obj.cb < (rimg.cr-2))
){
cW = obj.cr + 1;
cH = parseInt(prop * cW);
obj.clipTo(0,cW,cH,0,1);
}
}
Code:
else {
if ((obj.cr < (rimg.cr))&&
(obj.cb < (rimg.cb))
){
cW = obj.cr + 1;
cH = parseInt(prop * cW);
obj.clipTo(0,cW,cH,0,1);
}
}
If there are any (other) reasons not to do this please let me know. |
| Post Reply |
| Thread Tools | |
|
|