--- parser3/src/classes/image.C 2001/09/17 16:14:04 1.40.4.2 +++ parser3/src/classes/image.C 2001/09/18 16:05:42 1.44 @@ -4,10 +4,8 @@ Copyright(c) 2001 ArtLebedev Group(http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - - $Id: image.C,v 1.40.4.2 2001/09/17 16:14:04 parser Exp $ */ -static const char *RCSId="$Id: image.C,v 1.40.4.2 2001/09/17 16:14:04 parser Exp $"; +static const char *RCSId="$Id: image.C,v 1.44 2001/09/18 16:05:42 parser Exp $"; /* jpegsize: gets the width and height (in pixels) of a jpeg file @@ -47,7 +45,7 @@ public: // Methoded // helpers -/// simple buffered reader[from memory/file], used in _measure +#ifndef DOXYGEN class Measure_reader { public: enum { READ_CHUNK_SIZE=0x400*10 };// 10K @@ -83,6 +81,7 @@ private: size_t offset; size_t size; }; +#endif /// GIF file header struct GIF_Header { @@ -334,7 +333,7 @@ static gdImage *load(Request& r, const S const String& file_name){ Pool& pool=r.pool(); - 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_SPEC); if(FILE *f=fopen(file_name_cstr, "rb")) { gdImage& image=*new(pool) gdImage(pool); bool ok=image.CreateFromGif(f); @@ -392,9 +391,9 @@ static void _gif(Request& r, const Strin String out(pool); image->Gif(out); VFile& vfile=*new(pool) VFile(pool); - String& image_gif=*new(pool) String(pool, "image/gif"); + Value *content_type=new(pool) VString(*new(pool) String(pool, "image/gif")); vfile.set(false/*not tainted*/, - out.cstr(String::UL_AS_IS), out.size(), 0, &image_gif); + out.cstr(String::UL_AS_IS), out.size(), 0, content_type); r.write_no_lang(vfile); } @@ -472,7 +471,7 @@ static void add_point(Array::Item *value (**p).x=row.get_string(0)->as_int(); (**p).y=row.get_string(1)->as_int(); - *p++; + (*p)++; } #endif static void _replace(Request& r, const String& method_name, MethodParams *params) {