]> granicus.if.org Git - php/commitdiff
Be explicit here and cast it
authorRasmus Lerdorf <rasmus@php.net>
Tue, 13 Nov 2001 13:53:11 +0000 (13:53 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Tue, 13 Nov 2001 13:53:11 +0000 (13:53 +0000)
ext/gd/gd.c

index 4053e1100b8dca13ccee872b8289e90afe026046..ff7ebccd29eba69ce0930087d49c907c767d36c5 100644 (file)
@@ -3534,8 +3534,8 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
                        else {
                                y_ratio = x_ratio;
                        }
-                       dest_width = org_width / x_ratio;
-                       dest_height = org_height / y_ratio;
+                       dest_width = (int)(org_width / x_ratio);
+                       dest_height = (int)(org_height / y_ratio);
                }
                else {
                        x_ratio = (float) dest_width / (float) org_width;
@@ -3547,8 +3547,8 @@ static void _php_image_convert(INTERNAL_FUNCTION_PARAMETERS, int image_type )
                        else {
                                y_ratio = x_ratio;
                        }
-                       dest_width = org_width * x_ratio;
-                       dest_height = org_height * y_ratio;
+                       dest_width = (int)(org_width * x_ratio);
+                       dest_height = (int)(org_height * y_ratio);
                }
 
                im_tmp = gdImageCreate (dest_width, dest_height);