Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Finesse committed Nov 20, 2015
1 parent d15b579 commit cbbfd84
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Image.php
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ function insertImage(
if ( !is_numeric( $srcHeight ) ) $srcHeight = $image->getHeight() - $srcY;
if ( !is_numeric( $dstWidth ) ) $dstWidth = $srcWidth;
if ( !is_numeric( $dstHeight ) ) $dstHeight = $srcHeight;
$opacity = is_numeric( $opacity ) ? min( 1, max( 0, $opacity ) ) : 1;
if ( !is_numeric( $opacity ) ) $opacity = 1;

if ( $opacity == 0 )
if ( $opacity <= 0 )
return clone $this;

if ( $opacity < 1 ) {
Expand Down Expand Up @@ -957,7 +957,7 @@ protected static function sqDistance( $arr1, $arr2, $l )
* @return bool Удалось ли закодировать изображение
* @throws \InvalidArgumentException Если указанный формат не поддерживается
*/
protected static function saveImage( $bitmap, $file, $type, $quality = 1.0 )
protected static function saveImage( $bitmap, $file, $type, $quality = 0.75 )
{
switch ( $type ) {
case IMAGETYPE_JPEG:
Expand Down

0 comments on commit cbbfd84

Please sign in to comment.