Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 04-19-2005, 02:49 PM
Joris Offline
forum loafer
 
Join Date: Apr 2005
Posts: 13
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);
		   }
		}
new:
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);
		   }
		}
Works for me with Mozilla Firefox 1.0.2-1.0.3 (with TBE) and with Internet Explorer 6 on Windows XP SP2 (talking about the javascript of course).

If there are any (other) reasons not to do this please let me know.
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 10:51 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs