--- parser3/src/classes/image.C 2024/09/11 21:07:36 1.185 +++ parser3/src/classes/image.C 2024/10/20 13:38:31 1.188 @@ -26,7 +26,7 @@ #include "pa_table.h" #include "pa_charsets.h" -volatile const char * IDENT_IMAGE_C="$Id: image.C,v 1.185 2024/09/11 21:07:36 moko Exp $"; +volatile const char * IDENT_IMAGE_C="$Id: image.C,v 1.188 2024/10/20 13:38:31 moko Exp $"; // defines @@ -515,7 +515,7 @@ static void parse_IFD_entry(HashStringVa if(const char* name=(gps)?exif_gps_tag_value2name.get(tag):exif_tag_value2name.get(tag)) hash.put(name, value); else - hash.put(pa_uitoa(tag), value); + hash.put(pa_uitoa((int)tag), value); } } @@ -629,7 +629,7 @@ static void measure_jpeg(const String& o { // Segments that contain size info if(reader.read(buf, sizeof(JPG_Size_segment_body))width); @@ -960,7 +960,7 @@ static void measure(const String& file_n else throw Exception(IMAGE_FORMAT, &file_name, "unhandled file name extension '%s'", cext); } else - throw Exception(IMAGE_FORMAT, &file_name, "can not determine file type - no file name extension"); + throw Exception(IMAGE_FORMAT, &file_name, "cannot determine file type - no file name extension"); } // methods @@ -1075,7 +1075,7 @@ static gdImage* load(Request& r, const S throw Exception(IMAGE_FORMAT, &file_name, "is not in GIF format"); return image; } else { - throw Exception("file.missing", 0, "can not open '%s'", file_name_cstr); + throw Exception("file.missing", 0, "cannot open '%s'", file_name_cstr); } } @@ -1440,8 +1440,8 @@ static void _circle(Request& r, MethodPa gdImage& as_image(MethodParams& params, int index, const char* msg) { Value& value=params.as_no_junction(index, msg); - if(Value* vimage=value.as(VIMAGE_TYPE)) { - return static_cast(vimage)->image(); + if(VImage* vimage=dynamic_cast(&value)) { + return vimage->image(); } else throw Exception(PARSER_RUNTIME, 0, msg); }