Skip to content

Commit

Permalink
fixes #30
Browse files Browse the repository at this point in the history
  • Loading branch information
comur committed Jan 6, 2015
1 parent 729c973 commit 53d416c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Controller/UploadController.php
Expand Up @@ -321,7 +321,12 @@ private function resizeCropImage($destSrc, $imgSrc, $destX, $destY, $srcX, $srcY
$destH = $srcH;
}
$dstR = imagecreatetruecolor( $destW, $destH );


if($type == 'png'){
imagealphablending( $dstR, false );
imagesavealpha( $dstR, true );
}

imagecopyresampled($dstR,$imgR,$destX,$destY,$srcX,$srcY,$destW,$destH,$srcW,$srcH);

switch ($type) {
Expand Down
2 changes: 1 addition & 1 deletion Resources/public/js/comur.imagelibrary.js
Expand Up @@ -122,7 +122,7 @@ function initJCrop(id, options){
$('#image_preview img').Jcrop({
// start off with jcrop-light class
bgOpacity: 0.8,
bgColor: 'black',
bgColor: 'white',
addClass: 'jcrop-dark',
aspectRatio: options.cropConfig.aspectRatio ? options.cropConfig.minWidth/options.cropConfig.minHeight : false ,
minSize: [ options.cropConfig.minWidth, options.cropConfig.minHeight ],
Expand Down

0 comments on commit 53d416c

Please sign in to comment.