@@ -241,9 +241,9 @@ public function save($filename, $image_type = null, $quality = null, $permission
241
241
$ background = imagecolorallocate ($ dest_image , 255 , 255 , 255 );
242
242
imagefilledrectangle ($ dest_image , 0 , 0 , $ exact_size [0 ], $ exact_size [1 ], $ background );
243
243
} else {
244
- $ dest_image = imagecreatetruecolor ($ this ->getDestWidth (), $ this ->getDestHeight ());
244
+ $ dest_image = imagecreatetruecolor (( int ) $ this ->getDestWidth (), ( int ) $ this ->getDestHeight ());
245
245
$ background = imagecolorallocate ($ dest_image , 255 , 255 , 255 );
246
- imagefilledrectangle ($ dest_image , 0 , 0 , $ this ->getDestWidth (), $ this ->getDestHeight (), $ background );
246
+ imagefilledrectangle ($ dest_image , 0 , 0 , ( int ) $ this ->getDestWidth (), ( int ) $ this ->getDestHeight (), $ background );
247
247
}
248
248
break ;
249
249
@@ -337,12 +337,12 @@ public function save($filename, $image_type = null, $quality = null, $permission
337
337
$ this ->source_image ,
338
338
$ this ->dest_x ,
339
339
$ this ->dest_y ,
340
- $ this ->source_x ,
341
- $ this ->source_y ,
342
- $ this ->getDestWidth (),
343
- $ this ->getDestHeight (),
344
- $ this ->source_w ,
345
- $ this ->source_h
340
+ ( int ) $ this ->source_x ,
341
+ ( int ) $ this ->source_y ,
342
+ ( int ) $ this ->getDestWidth (),
343
+ ( int ) $ this ->getDestHeight (),
344
+ ( int ) $ this ->source_w ,
345
+ ( int ) $ this ->source_h
346
346
);
347
347
348
348
if ($ this ->gamma_correct ) {
@@ -712,7 +712,7 @@ public function getSourceHeight()
712
712
/**
713
713
* Gets width of the destination image
714
714
*
715
- * @return integer
715
+ * @return integer|float
716
716
*/
717
717
public function getDestWidth ()
718
718
{
@@ -721,7 +721,8 @@ public function getDestWidth()
721
721
722
722
/**
723
723
* Gets height of the destination image
724
- * @return integer
724
+ *
725
+ * @return integer|float
725
726
*/
726
727
public function getDestHeight ()
727
728
{
0 commit comments