+static VALUE image_rescale(VALUE cls, VALUE _width, VALUE _height)
+{
+ Get_Image(image,cls)
+ Check_Type(_width, T_FIXNUM);
+ Check_Type(_height, T_FIXNUM);
+ int width = FIX2INT(_width);
+ int height = FIX2INT(_height);
+ volatile VALUE v_image2 = image_allocate(Bitmap);
+ Get_Image(image2,v_image2)
+ image2->doc = image->doc;
+ image2->image = gfximage_rescale(image->image, width, height);
+ if(!image2->image) {
+ rb_raise(rb_eArgError, "Can't rescale to size %dx%d", width, height);
+ }
+ return v_image2;
+}