summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2001-11-13 13:53:11 +0000
committerRasmus Lerdorf <rasmus@php.net>2001-11-13 13:53:11 +0000
commita9fe559f6006fdadce7957100433bd24ad70e33c (patch)
tree1e1eecbc202849b1a81c2787088e27d999a63d4b
parent55d9b2ad9c212d92fca15563e2d8b6fb08193256 (diff)
downloadphp-git-a9fe559f6006fdadce7957100433bd24ad70e33c.tar.gz
Be explicit here and cast it
-rw-r--r--ext/gd/gd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c
index 4053e1100b..ff7ebccd29 100644
--- a/ext/gd/gd.c
+++ b/ext/gd/gd.c
@@ -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);