Skip to content

Commit 74f5641

Browse files
committed
Merge branch 'master' into 1.0
2 parents 3528ca2 + 53d416c commit 74f5641

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

Controller/UploadController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,12 @@ private function resizeCropImage($destSrc, $imgSrc, $destX, $destY, $srcX, $srcY
321321
$destH = $srcH;
322322
}
323323
$dstR = imagecreatetruecolor( $destW, $destH );
324-
324+
325+
if($type == 'png'){
326+
imagealphablending( $dstR, false );
327+
imagesavealpha( $dstR, true );
328+
}
329+
325330
imagecopyresampled($dstR,$imgR,$destX,$destY,$srcX,$srcY,$destW,$destH,$srcW,$srcH);
326331

327332
switch ($type) {

Resources/public/js/comur.imagelibrary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ function initJCrop(id, options){
123123
$('#image_preview img').Jcrop({
124124
// start off with jcrop-light class
125125
bgOpacity: 0.8,
126-
bgColor: 'black',
126+
bgColor: 'white',
127127
addClass: 'jcrop-dark',
128128
aspectRatio: options.cropConfig.aspectRatio ? options.cropConfig.minWidth/options.cropConfig.minHeight : false ,
129129
minSize: [ options.cropConfig.minWidth, options.cropConfig.minHeight ],

0 commit comments

Comments
 (0)