|
|
| version 1.8, 2001/04/11 17:00:53 | version 1.9, 2001/04/11 17:06:10 |
|---|---|
| Line 328 static void _load(Request& r, const Stri | Line 328 static void _load(Request& r, const Stri |
| const String& file_name=vfile_name.as_string(); | const String& file_name=vfile_name.as_string(); |
| const char *file_name_cstr=r.absolute(file_name).cstr(String::UL_FILE_NAME); | const char *file_name_cstr=r.absolute(file_name).cstr(String::UL_FILE_NAME); |
| gdImage image(pool); | |
| if(FILE *f=fopen(file_name_cstr, "rb")) { | if(FILE *f=fopen(file_name_cstr, "rb")) { |
| gdImagePtr image=gdImageCreateFromGif(f); | image.CreateFromGif(f); |
| int width=gdImageSX(image); | int width=image.SX(); |
| int height=gdImageSY(image); | int height=image.SY(); |
| fclose(f); | fclose(f); |
| static_cast<VImage *>(r.self)->set(&file_name, width, height, image); | static_cast<VImage *>(r.self)->set(&file_name, width, height, &image); |
| } else | } else |
| PTHROW(0, 0, | PTHROW(0, 0, |
| &method_name, | &method_name, |
| Line 364 static void _create(Request& r, const St | Line 365 static void _create(Request& r, const St |
| static void _gif(Request& r, const String& method_name, Array *params) { | static void _gif(Request& r, const String& method_name, Array *params) { |
| Pool& pool=r.pool(); | Pool& pool=r.pool(); |
| gdImagePtr image=static_cast<VImage *>(r.self)->image; | gdImage *image=static_cast<VImage *>(r.self)->image; |
| if(!image) | if(!image) |
| PTHROW(0, 0, | PTHROW(0, 0, |
| &method_name, | &method_name, |