--- parser3/src/classes/image.C 2020/12/03 22:48:09 1.174 +++ parser3/src/classes/image.C 2020/12/07 23:18:40 1.178 @@ -26,7 +26,7 @@ #include "pa_table.h" #include "pa_charsets.h" -volatile const char * IDENT_IMAGE_C="$Id: image.C,v 1.174 2020/12/03 22:48:09 moko Exp $"; +volatile const char * IDENT_IMAGE_C="$Id: image.C,v 1.178 2020/12/07 23:18:40 moko Exp $"; // defines @@ -447,7 +447,7 @@ static Value* parse_IFD_entry_formatted_ return result; } -static Value* parse_IFD_entry_value(bool is_big, Measure_reader& reader, long tiff_base, JPG_Exif_IFD_entry& entry) { +static Value* parse_IFD_entry_value(bool is_big, Measure_reader& reader, uint64_t tiff_base, JPG_Exif_IFD_entry& entry) { size_t format2component_size[]={ 0, // undefined 1, // unsigned byte @@ -498,9 +498,9 @@ static Value* parse_IFD_entry_value(bool return result; } -static void parse_IFD(HashStringValue& hash, bool is_big, Measure_reader& reader, long tiff_base, bool gps=false); +static void parse_IFD(HashStringValue& hash, bool is_big, Measure_reader& reader, uint64_t tiff_base, bool gps=false); -static void parse_IFD_entry(HashStringValue& hash, bool is_big, Measure_reader& reader, long tiff_base, JPG_Exif_IFD_entry& entry, bool gps=false) { +static void parse_IFD_entry(HashStringValue& hash, bool is_big, Measure_reader& reader, uint64_t tiff_base, JPG_Exif_IFD_entry& entry, bool gps=false) { ushort tag=endian_to_ushort(is_big, entry.tag); if(tag==JPG_IFD_TAG_EXIF_OFFSET || tag==JPG_IFD_TAG_EXIF_GPS_OFFSET){ @@ -521,7 +521,7 @@ static void parse_IFD_entry(HashStringVa } } -static void parse_IFD(HashStringValue& hash, bool is_big, Measure_reader& reader, long tiff_base, bool gps) { +static void parse_IFD(HashStringValue& hash, bool is_big, Measure_reader& reader, uint64_t tiff_base, bool gps) { const char* buf; if(reader.read(buf, sizeof(JPG_Exif_IFD_begin))components_count) != 1) return false; uint value = (entry_format == 3) ? endian_to_ushort(is_big, entry->value_or_offset_to_it) : endian_to_uint(is_big, entry->value_or_offset_to_it); - (entry_tag == 256) ? info.width=value : info.height=value; + (entry_tag == 256) ? info.width=(short)value : info.height=(short)value; if(info.width && info.height) return true; }