|
|
| version 1.73, 2002/08/01 11:26:43 | version 1.75, 2002/08/15 09:07:48 |
|---|---|
| Line 5 | Line 5 |
| Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) | Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru) |
| */ | */ |
| static const char* IDENT_IMAGE_C="$Id$"; | static const char* IDENT_IMAGE_C="$Date$"; |
| /* | /* |
| jpegsize: gets the width and height (in pixels) of a jpeg file | jpegsize: gets the width and height (in pixels) of a jpeg file |
| Line 792 static void _circle(Request& r, const St | Line 792 static void _circle(Request& r, const St |
| gdImage& as_image(Pool& pool, const String& method_name, MethodParams *params, | gdImage& as_image(Pool& pool, const String& method_name, MethodParams *params, |
| int index, const char *msg) { | int index, const char *msg) { |
| Value& value=params->as_no_junction(index, msg); | gdImage *src=0; |
| if(strcmp(value.type(), VIMAGE_TYPE)!=0) | Value& value=params->as_no_junction(index, msg); |
| throw Exception("parser.runtime", | |
| &method_name, | |
| msg); | |
| gdImage *src=static_cast<VImage *>(&value)->image; | if(Value *vimage=value.as(VIMAGE_TYPE, false)) { |
| if(!src) | src=static_cast<VImage *>(vimage)->image; |
| if(!src) | |
| throw Exception("parser.runtime", | |
| &method_name, | |
| msg); | |
| } else | |
| throw Exception("parser.runtime", | throw Exception("parser.runtime", |
| &method_name, | &method_name, |
| msg); | msg); |