Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function saveBig($savefile){
- $image=new Gmagick($savefile);
- $width=$image->getimagewidth();
- $height=$image->getimageheight();
- $standartWidth=1024;
- $standartHeight=756;
- $masWidth=1300;
- $masHeight=900;
- $kw=$width/$masWidth;
- $kh=$height/$masHeight;
- $wx=$width/$kw;
- $hy=$height/$kh;
- $image->setCompressionQuality(75);
- $image->resizeimage($wx,$hy,null, 1, true);
- $x=(($masWidth-$standartWidth)/2);
- $y=(($masHeight-$standartHeight)/2);
- $image->cropimage($standartWidth, $standartHeight, $x,$y);
- $image->writeimage($savefile);
- }
Add Comment
Please, Sign In to add comment