--- parser3/src/classes/image.C 2003/02/04 14:04:45 1.90.2.4 +++ parser3/src/classes/image.C 2003/03/17 14:48:04 1.90.4.1 @@ -1,11 +1,11 @@ /** @file Parser: @b image parser class. - Copyright(c) 2001-2003 ArtLebedev Group (http://www.artlebedev.com) + Copyright(c) 2001, 2003 ArtLebedev Group (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_IMAGE_C="$Date: 2003/02/04 14:04:45 $"; +static const char* IDENT_IMAGE_C="$Date: 2003/03/17 14:48:04 $"; /* jpegsize: gets the width and height (in pixels) of a jpeg file @@ -30,7 +30,7 @@ static const char* IDENT_IMAGE_C="$Date: class MImage : public Methoded { public: // VStateless_class - ValuePtr create_new_value() { return ValuePtr(new VImage()); } + Value *create_new_value(Pool& pool) { return new(pool) VImage(pool); } public: MImage(Pool& pool); @@ -42,10 +42,6 @@ public: // Methoded // helpers -/// value of exif tag -> it's value -Hash exif_tag_value2name; - - #ifndef DOXYGEN class Measure_reader { public: @@ -56,7 +52,7 @@ public: class Measure_file_reader: public Measure_reader { public: - Measure_file_reader(Pool& apool, int af, const String& afile_name, const char* afname): + Measure_file_reader(Pool& apool, int af, const String& afile_name, const char *afname): pool(apool), file_name(afile_name), fname(afname), f(af) { } @@ -64,7 +60,7 @@ public: if(limit==0) return 0; - void *lbuf=pool.malloc(limit); + void *lbuf=pool.malloc_atomic(limit); size_t read_size=(size_t)::read(f, lbuf, limit); abuf=lbuf; if(ssize_t(read_size)<0 || read_size>limit) throw Exception(0, @@ -87,7 +83,7 @@ public: private: Pool& pool; - const String& file_name; const char* fname; + const String& file_name; const char *fname; int f; }; @@ -290,7 +286,7 @@ static Value *parse_IFD_entry_formatted_ size_t component_size, uint components_count, const uchar *value) { if(format==2) { // ascii string, exception: the only type with varying size - const char* cstr=(const char* )value; + const char *cstr=(const char *)value; size_t size=components_count; // Data format is "YYYY:MM:DD HH:MM:SS"+0x00, total 20bytes if(size==JPEG_EXIF_DATE_CHARS @@ -304,7 +300,7 @@ static Value *parse_IFD_entry_formatted_ return new(pool) VDate(pool, t); } - if(const char* premature_zero_pos=(const char* )memchr(cstr, 0, size)) + if(const char *premature_zero_pos=(const char *)memchr(cstr, 0, size)) size=premature_zero_pos-cstr; return new(pool) VString(*new(pool) String(pool, cstr, size, true/*tainted*/)); } @@ -317,7 +313,7 @@ static Value *parse_IFD_entry_formatted_ for(uint i=0; iget(skey)) + if(const char *name=(const char *)exif_tag_value2name->get(skey)) hash.put(*new(pool) String(pool, name), value); else hash.put(skey, value); @@ -560,7 +556,7 @@ static void measure_png(Pool& pool, cons static void measure(Pool& pool, const String& file_name, Measure_reader& reader, ushort& width, ushort& height, Value ** exif) { - if(const char* cext=strrchr(file_name.cstr(String::UL_FILE_SPEC), '.')) { + if(const char *cext=strrchr(file_name.cstr(String::UL_FILE_SPEC), '.')) { cext++; if(strcasecmp(cext, "GIF")==0) measure_gif(pool, &file_name, reader, width, height); @@ -590,7 +586,7 @@ struct File_measure_action_info { #endif static void file_measure_action(Pool& pool, struct stat& finfo, int f, - const String& file_spec, const char* fname, bool as_text, + const String& file_spec, const char *fname, bool as_text, void *context) { File_measure_action_info& info=*static_cast(context); @@ -598,10 +594,10 @@ static void file_measure_action(Pool& po measure(pool, *info.file_name, reader, *info.width, *info.height, info.exif); } -static void _measure(Request& r, StringPtr method_name, MethodParams& params) { +static void _measure(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - Value& data=params.as_no_junction(0, "data must not be code"); + Value& data=params->as_no_junction(0, "data must not be code"); ushort width=0; ushort height=0; @@ -645,7 +641,7 @@ static void append_attrib_pair(const Has if(value.is_string() || value.as_int()>=0) *ai.tag << "=\"" << value.as_string() << "\""; } -static void _html(Request& r, StringPtr method_name, MethodParams& params) { +static void _html(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); String tag(pool); @@ -654,9 +650,9 @@ static void _html(Request& r, StringPtr const Hash& fields=static_cast(r.get_self())->fields(); Hash *attribs=0; - if(params.count()) { + if(params->size()) { // for backward compatibility: someday was ^html{} - Value &vattribs=r.process_to_value(params.get(0), + Value &vattribs=r.process_to_value(params->get(0), /*0/*no name* /,*/ false/*don't intercept string*/); if(!vattribs.is_string()) // allow empty @@ -680,7 +676,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_SPEC); + 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); @@ -699,10 +695,10 @@ static gdImage *load(Request& r, const S } -static void _load(Request& r, StringPtr method_name, MethodParams& params) { +static void _load(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - const String& file_name=params.as_string(0, "file name must not be code"); + const String& file_name=params->as_string(0, "file name must not be code"); gdImage& image=*load(r, method_name, file_name); int width=image.SX(); @@ -710,21 +706,21 @@ static void _load(Request& r, StringPtr static_cast(r.get_self())->set(&file_name, width, height, &image); } -static void _create(Request& r, StringPtr method_name, MethodParams& params) { +static void _create(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - int width=params.as_int(0, "width must be int", r); - int height=params.as_int(1, "height must be int", r); + int width=params->as_int(0, "width must be int", r); + int height=params->as_int(1, "height must be int", r); int bgcolor_value=0xffFFff; - if(params.count()>2) - bgcolor_value=params.as_int(2, "color must be int", r); + if(params->size()>2) + bgcolor_value=params->as_int(2, "color must be int", r); gdImage& image=*new(pool) gdImage(pool); image.Create(width, height); image.FilledRectangle(0, 0, width-1, height-1, image.Color(bgcolor_value)); static_cast(r.get_self())->set(0, width, height, &image); } -static void _gif(Request& r, StringPtr method_name, MethodParams& params) { +static void _gif(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -745,7 +741,7 @@ static void _gif(Request& r, StringPtr m r.write_no_lang(vfile); } -static void _line(Request& r, StringPtr method_name, MethodParams& params) { +static void _line(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -755,14 +751,14 @@ static void _line(Request& r, StringPtr "does not contain an image"); image->Line( - params.as_int(0, "x0 must be int", r), - params.as_int(1, "y0 must be int", r), - params.as_int(2, "x1 must be int", r), - params.as_int(3, "y1 must be int", r), - image->Color(params.as_int(4, "color must be int", r))); + params->as_int(0, "x0 must be int", r), + params->as_int(1, "y0 must be int", r), + params->as_int(2, "x1 must be int", r), + params->as_int(3, "y1 must be int", r), + image->Color(params->as_int(4, "color must be int", r))); } -static void _fill(Request& r, StringPtr method_name, MethodParams& params) { +static void _fill(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -772,12 +768,12 @@ static void _fill(Request& r, StringPtr "does not contain an image"); image->Fill( - params.as_int(0, "x must be int", r), - params.as_int(1, "y must be int", r), - image->Color(params.as_int(2, "color must be int", r))); + params->as_int(0, "x must be int", r), + params->as_int(1, "y must be int", r), + image->Color(params->as_int(2, "color must be int", r))); } -static void _rectangle(Request& r, StringPtr method_name, MethodParams& params) { +static void _rectangle(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -787,14 +783,14 @@ static void _rectangle(Request& r, Strin "does not contain an image"); image->Rectangle( - params.as_int(0, "x0 must be int", r), - params.as_int(1, "y0 must be int", r), - params.as_int(2, "x1 must be int", r), - params.as_int(3, "y1 must be int", r), - image->Color(params.as_int(4, "color must be int", r))); + params->as_int(0, "x0 must be int", r), + params->as_int(1, "y0 must be int", r), + params->as_int(2, "x1 must be int", r), + params->as_int(3, "y1 must be int", r), + image->Color(params->as_int(4, "color must be int", r))); } -static void _bar(Request& r, StringPtr method_name, MethodParams& params) { +static void _bar(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -804,11 +800,11 @@ static void _bar(Request& r, StringPtr m "does not contain an image"); image->FilledRectangle( - params.as_int(0, "x0 must be int", r), - params.as_int(1, "y0 must be int", r), - params.as_int(2, "x1 must be int", r), - params.as_int(3, "y1 must be int", r), - image->Color(params.as_int(4, "color must be int", r))); + params->as_int(0, "x0 must be int", r), + params->as_int(1, "y0 must be int", r), + params->as_int(2, "x1 must be int", r), + params->as_int(3, "y1 must be int", r), + image->Color(params->as_int(4, "color must be int", r))); } #ifndef DOXYGEN @@ -821,7 +817,7 @@ static void add_point(Array::Item *value (*p)++; } #endif -static void _replace(Request& r, StringPtr method_name, MethodParams& params) { +static void _replace(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -830,21 +826,21 @@ static void _replace(Request& r, StringP &method_name, "does not contain an image"); - Table *table=params.as_no_junction(2, "coordinates must not be code").get_table(); + Table *table=params->as_no_junction(2, "coordinates must not be code").get_table(); if(!table) throw Exception(0, &method_name, "coordinates must be table"); - gdImage::Point *all_p=(gdImage::Point *)pool.malloc(sizeof(gdImage::Point)*table->size()); + gdImage::Point *all_p=(gdImage::Point *)pool.malloc_atomic(sizeof(gdImage::Point)*table->size()); gdImage::Point *add_p=all_p; table->for_each(add_point, &add_p); image->FilledPolygonReplaceColor(all_p, table->size(), - image->Color(params.as_int(0, "src color must be int", r)), - image->Color(params.as_int(1, "dest color must be int", r))); + image->Color(params->as_int(0, "src color must be int", r)), + image->Color(params->as_int(1, "dest color must be int", r))); } -static void _polyline(Request& r, StringPtr method_name, MethodParams& params) { +static void _polyline(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -853,21 +849,21 @@ static void _polyline(Request& r, String &method_name, "does not contain an image"); - Table *table=params.as_no_junction(1, "coordinates must not be code").get_table(); + Table *table=params->as_no_junction(1, "coordinates must not be code").get_table(); if(!table) throw Exception(0, &method_name, "coordinates must be table"); - gdImage::Point *all_p=(gdImage::Point *)pool.malloc(sizeof(gdImage::Point)*table->size()); + gdImage::Point *all_p=(gdImage::Point *)pool.malloc_atomic(sizeof(gdImage::Point)*table->size()); gdImage::Point *add_p=all_p; table->for_each(add_point, &add_p); image->Polygon(all_p, table->size(), - image->Color(params.as_int(0, "color must be int", r)), + image->Color(params->as_int(0, "color must be int", r)), false/*not closed*/); } -static void _polygon(Request& r, StringPtr method_name, MethodParams& params) { +static void _polygon(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -876,20 +872,20 @@ static void _polygon(Request& r, StringP &method_name, "does not contain an image"); - Table *table=params.as_no_junction(1, "coordinates must not be code").get_table(); + Table *table=params->as_no_junction(1, "coordinates must not be code").get_table(); if(!table) throw Exception(0, &method_name, "coordinates must be table"); - gdImage::Point *all_p=(gdImage::Point *)pool.malloc(sizeof(gdImage::Point)*table->size()); + gdImage::Point *all_p=(gdImage::Point *)pool.malloc_atomic(sizeof(gdImage::Point)*table->size()); gdImage::Point *add_p=all_p; table->for_each(add_point, &add_p); image->Polygon(all_p, table->size(), - image->Color(params.as_int(0, "color must be int", r))); + image->Color(params->as_int(0, "color must be int", r))); } -static void _polybar(Request& r, StringPtr method_name, MethodParams& params) { +static void _polybar(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -898,17 +894,17 @@ static void _polybar(Request& r, StringP &method_name, "does not contain an image"); - Table *table=params.as_no_junction(1, "coordinates must not be code").get_table(); + Table *table=params->as_no_junction(1, "coordinates must not be code").get_table(); if(!table) throw Exception("parser.runtime", &method_name, "coordinates must be table"); - gdImage::Point *all_p=(gdImage::Point *)pool.malloc(sizeof(gdImage::Point)*table->size()); + gdImage::Point *all_p=(gdImage::Point *)pool.malloc_atomic(sizeof(gdImage::Point)*table->size()); gdImage::Point *add_p=all_p; table->for_each(add_point, &add_p); image->FilledPolygon(all_p, table->size(), - image->Color(params.as_int(0, "color must be int", r))); + image->Color(params->as_int(0, "color must be int", r))); } // font @@ -966,7 +962,7 @@ public: // counts trailing letter_spacing, consider this OK. useful for contiuations int string_width(const String& s){ - const char* cstr=s.cstr(); + const char *cstr=s.cstr(); int result=0; for(; *cstr; cstr++) result+=step_width(index_of(*cstr)); @@ -974,7 +970,7 @@ public: } void string_display(gdImage& image, int x, int y, const String& s){ - const char* cstr=s.cstr(); + const char *cstr=s.cstr(); if(cstr) for(; *cstr; cstr++) { int index=index_of(*cstr); index_display(image, x, y, index); @@ -985,15 +981,15 @@ public: }; const int Font::letter_spacing=1; -static void _font(Request& r, StringPtr method_name, MethodParams& params) { +static void _font(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - const String& alphabet=params.as_string(0, "alphabet must not be code"); - gdImage& image=*load(r, method_name, params.as_string(1, "file_name must not be code")); - int spacebar_width=params.as_int(2, "spacebar_width must be int", r); + const String& alphabet=params->as_string(0, "alphabet must not be code"); + gdImage& image=*load(r, method_name, params->as_string(1, "file_name must not be code")); + int spacebar_width=params->as_int(2, "spacebar_width must be int", r); int monospace_width; - if(params.count()>3) { - monospace_width=params.as_int(3, "monospace_width must be int", r); + if(params->size()>3) { + monospace_width=params->as_int(3, "monospace_width must be int", r); if(!monospace_width) monospace_width=image.SX(); } else @@ -1016,12 +1012,12 @@ static void _font(Request& r, StringPtr image.SY() / alphabet.size(), monospace_width, spacebar_width); } -static void _text(Request& r, StringPtr method_name, MethodParams& params) { +static void _text(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - int x=params.as_int(0, "x must be int", r); - int y=params.as_int(1, "y must be int", r); - const String& s=params.as_string(2, "text must not be code"); + int x=params->as_int(0, "x must be int", r); + int y=params->as_int(1, "y must be int", r); + const String& s=params->as_string(2, "text must not be code"); VImage& vimage=*static_cast(r.get_self()); if(vimage.image) @@ -1037,10 +1033,10 @@ static void _text(Request& r, StringPtr "does not contain an image"); } -static void _length(Request& r, StringPtr method_name, MethodParams& params) { +static void _length(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); - const String& s=params.as_string(0, "text must not be code"); + const String& s=params->as_string(0, "text must not be code"); VImage& vimage=*static_cast(r.get_self()); if(vimage.image) @@ -1056,7 +1052,7 @@ static void _length(Request& r, StringPt "does not contain an image"); } -static void _arc(Request& r, StringPtr method_name, MethodParams& params) { +static void _arc(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -1066,16 +1062,16 @@ static void _arc(Request& r, StringPtr m "does not contain an image"); image->Arc( - params.as_int(0, "center_x must be int", r), - params.as_int(1, "center_y must be int", r), - params.as_int(2, "width must be int", r), - params.as_int(3, "height must be int", r), - params.as_int(4, "start degrees must be int", r), - params.as_int(5, "end degrees must be int", r), - image->Color(params.as_int(6, "cx must be int", r))); + params->as_int(0, "center_x must be int", r), + params->as_int(1, "center_y must be int", r), + params->as_int(2, "width must be int", r), + params->as_int(3, "height must be int", r), + params->as_int(4, "start degrees must be int", r), + params->as_int(5, "end degrees must be int", r), + image->Color(params->as_int(6, "cx must be int", r))); } -static void _sector(Request& r, StringPtr method_name, MethodParams& params) { +static void _sector(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -1085,16 +1081,16 @@ static void _sector(Request& r, StringPt "does not contain an image"); image->Sector( - params.as_int(0, "center_x must be int", r), - params.as_int(1, "center_y must be int", r), - params.as_int(2, "width must be int", r), - params.as_int(3, "height must be int", r), - params.as_int(4, "start degrees must be int", r), - params.as_int(5, "end degrees must be int", r), - image->Color(params.as_int(6, "color must be int", r))); + params->as_int(0, "center_x must be int", r), + params->as_int(1, "center_y must be int", r), + params->as_int(2, "width must be int", r), + params->as_int(3, "height must be int", r), + params->as_int(4, "start degrees must be int", r), + params->as_int(5, "end degrees must be int", r), + image->Color(params->as_int(6, "color must be int", r))); } -static void _circle(Request& r, StringPtr method_name, MethodParams& params) { +static void _circle(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *image=static_cast(r.get_self())->image; @@ -1103,22 +1099,22 @@ static void _circle(Request& r, StringPt &method_name, "does not contain an image"); - int size=params.as_int(2, "radius must be int", r)*2; + int size=params->as_int(2, "radius must be int", r)*2; image->Arc( - params.as_int(0, "center_x must be int", r), - params.as_int(1, "center_y must be int", r), + params->as_int(0, "center_x must be int", r), + params->as_int(1, "center_y must be int", r), size, //w size, //h 0, //s 360, //e - image->Color(params.as_int(3, "color must be int", r))); + image->Color(params->as_int(3, "color must be int", r))); } -gdImage& as_image(Pool& pool, StringPtr method_name, MethodParams& params, - int index, const char* msg) { +gdImage& as_image(Pool& pool, const String& method_name, MethodParams *params, + int index, const char *msg) { gdImage *src=0; - Value& value=params.as_no_junction(index, msg); + Value& value=params->as_no_junction(index, msg); if(Value *vimage=value.as(VIMAGE_TYPE, false)) { src=static_cast(vimage)->image; @@ -1134,7 +1130,7 @@ gdImage& as_image(Pool& pool, StringPtr return *src; } -static void _copy(Request& r, StringPtr method_name, MethodParams& params) { +static void _copy(Request& r, const String& method_name, MethodParams *params) { Pool& pool=r.pool(); gdImage *dest=static_cast(r.get_self())->image; @@ -1145,18 +1141,18 @@ static void _copy(Request& r, StringPtr gdImage& src=as_image(pool, method_name, params, 0, "src must be image"); - int sx=params.as_int(1, "src_x must be int", r); - int sy=params.as_int(2, "src_y must be int", r); - int sw=params.as_int(3, "src_w must be int", r); - int sh=params.as_int(4, "src_h must be int", r); - int dx=params.as_int(5, "dest_x must be int", r); - int dy=params.as_int(6, "dest_y must be int", r); - if(params.count()>1+2+2+2) { - int dw=params.as_int(1+2+2+2, "dest_w must be int", r); - int dh=(int)(params.count()>1+2+2+2+1? - params.as_int(1+2+2+2+1, "dest_h must be int", r):sh*(((double)dw)/((double)sw))); - int tolerance=params.count()>1+2+2+2+2? - params.as_int(1+2+2+2+2, "tolerance must be int", r):150; + int sx=params->as_int(1, "src_x must be int", r); + int sy=params->as_int(2, "src_y must be int", r); + int sw=params->as_int(3, "src_w must be int", r); + int sh=params->as_int(4, "src_h must be int", r); + int dx=params->as_int(5, "dest_x must be int", r); + int dy=params->as_int(6, "dest_y must be int", r); + if(params->size()>1+2+2+2) { + int dw=params->as_int(1+2+2+2, "dest_w must be int", r); + int dh=(int)(params->size()>1+2+2+2+1? + params->as_int(1+2+2+2+1, "dest_h must be int", r):sh*(((double)dw)/((double)sw))); + int tolerance=params->size()>1+2+2+2+2? + params->as_int(1+2+2+2+2, "tolerance must be int", r):150; src.CopyResampled(*dest, dx, dy, sx, sy, dw, dh, sw, sh, tolerance); } else @@ -1238,101 +1234,5 @@ Methoded *image_class; // creator Methoded *MImage_create(Pool& pool) { - // image JPEG Exif - #define EXIF_TAG(tag, name) \ - exif_tag_value2name.put(tag, #name); - // Tags used by IFD0 (main image) - EXIF_TAG(0x010e, ImageDescription); - EXIF_TAG(0x010f, Make); - EXIF_TAG(0x0110, Model); - EXIF_TAG(0x0112, Orientation); - EXIF_TAG(0x011a, XResolution); - EXIF_TAG(0x011b, YResolution); - EXIF_TAG(0x0128, ResolutionUnit); - EXIF_TAG(0x0131, Software); - EXIF_TAG(0x0132, DateTime); - EXIF_TAG(0x013e, WhitePoint); - EXIF_TAG(0x013f, PrimaryChromaticities); - EXIF_TAG(0x0211, YCbCrCoefficients); - EXIF_TAG(0x0213, YCbCrPositioning); - EXIF_TAG(0x0214, ReferenceBlackWhite); - EXIF_TAG(0x8298, Copyright); - EXIF_TAG(0x8769, ExifOffset); - // Tags used by Exif SubIFD - EXIF_TAG(0x829a, ExposureTime); - EXIF_TAG(0x829d, FNumber); - EXIF_TAG(0x8822, ExposureProgram); - EXIF_TAG(0x8827, ISOSpeedRatings); - EXIF_TAG(0x9000, ExifVersion); - EXIF_TAG(0x9003, DateTimeOriginal); - EXIF_TAG(0x9004, DateTimeDigitized); - EXIF_TAG(0x9101, ComponentsConfiguration); - EXIF_TAG(0x9102, CompressedBitsPerPixel); - EXIF_TAG(0x9201, ShutterSpeedValue); - EXIF_TAG(0x9202, ApertureValue); - EXIF_TAG(0x9203, BrightnessValue); - EXIF_TAG(0x9204, ExposureBiasValue); - EXIF_TAG(0x9205, MaxApertureValue); - EXIF_TAG(0x9206, SubjectDistance); - EXIF_TAG(0x9207, MeteringMode); - EXIF_TAG(0x9208, LightSource); - EXIF_TAG(0x9209, Flash); - EXIF_TAG(0x920a, FocalLength); - EXIF_TAG(0x927c, MakerNote); - EXIF_TAG(0x9286, UserComment); - EXIF_TAG(0x9290, SubsecTime); - EXIF_TAG(0x9291, SubsecTimeOriginal); - EXIF_TAG(0x9292, SubsecTimeDigitized); - EXIF_TAG(0xa000, FlashPixVersion); - EXIF_TAG(0xa001, ColorSpace); - EXIF_TAG(0xa002, ExifImageWidth); - EXIF_TAG(0xa003, ExifImageHeight); - EXIF_TAG(0xa004, RelatedSoundFile); - EXIF_TAG(0xa005, ExifInteroperabilityOffset); - EXIF_TAG(0xa20e, FocalPlaneXResolution); - EXIF_TAG(0xa20f, FocalPlaneYResolution); - EXIF_TAG(0xa210, FocalPlaneResolutionUnit); - EXIF_TAG(0xa215, ExposureIndex); - EXIF_TAG(0xa217, SensingMethod); - EXIF_TAG(0xa300, FileSource); - EXIF_TAG(0xa301, SceneType); - EXIF_TAG(0xa302, CFAPattern); - // Misc Tags - EXIF_TAG(0x00fe, NewSubfileType); - EXIF_TAG(0x00ff, SubfileType); - EXIF_TAG(0x012d, TransferFunction); - EXIF_TAG(0x013b, Artist); - EXIF_TAG(0x013d, Predictor); - EXIF_TAG(0x0142, TileWidth); - EXIF_TAG(0x0143, TileLength); - EXIF_TAG(0x0144, TileOffsets); - EXIF_TAG(0x0145, TileByteCounts); - EXIF_TAG(0x014a, SubIFDs); - EXIF_TAG(0x015b, JPEGTables); - EXIF_TAG(0x828d, CFARepeatPatternDim); - EXIF_TAG(0x828e, CFAPattern); - EXIF_TAG(0x828f, BatteryLevel); - EXIF_TAG(0x83bb, IPTC/NAA); - EXIF_TAG(0x8773, InterColorProfile); - EXIF_TAG(0x8824, SpectralSensitivity); - EXIF_TAG(0x8825, GPSInfo); - EXIF_TAG(0x8828, OECF); - EXIF_TAG(0x8829, Interlace); - EXIF_TAG(0x882a, TimeZoneOffset); - EXIF_TAG(0x882b, SelfTimerMode); - EXIF_TAG(0x920b, FlashEnergy); - EXIF_TAG(0x920c, SpatialFrequencyResponse); - EXIF_TAG(0x920d, Noise); - EXIF_TAG(0x9211, ImageNumber); - EXIF_TAG(0x9212, SecurityClassification); - EXIF_TAG(0x9213, ImageHistory); - EXIF_TAG(0x9214, SubjectLocation); - EXIF_TAG(0x9215, ExposureIndex); - EXIF_TAG(0x9216, TIFF/EPStandardID); - EXIF_TAG(0xa20b, FlashEnergy); - EXIF_TAG(0xa20c, SpatialFrequencyResponse); - EXIF_TAG(0xa214, SubjectLocation); - #undef EXIF_TAG - return image_class=new(pool) MImage(pool); }