Diff for /parser3/src/classes/image.C between versions 1.181 and 1.185

version 1.181, 2020/12/23 15:01:13 version 1.185, 2024/09/11 21:07:36
Line 1 Line 1
 /** @file  /** @file
         Parser: @b image parser class.          Parser: @b image parser class.
   
         Copyright (c) 2001-2020 Art. Lebedev Studio (http://www.artlebedev.com)          Copyright (c) 2001-2023 Art. Lebedev Studio (http://www.artlebedev.com)
         Author: Alexandr Petrosian <paf@design.ru> (http://paf.design.ru)          Authors: Konstantin Morshnev <moko@design.ru>, Alexandr Petrosian <paf@design.ru>
 */  */
   
 /*  /*
Line 421  static Value* parse_IFD_entry_formatted_ Line 421  static Value* parse_IFD_entry_formatted_
                 size_t length=components_count;                  size_t length=components_count;
                 // Data format is "YYYY:MM:DD HH:MM:SS"+0x00, total 20bytes                  // Data format is "YYYY:MM:DD HH:MM:SS"+0x00, total 20bytes
                 if(length==JPEG_EXIF_DATE_CHARS && isdigit((unsigned char)cstr[0]) && cstr[length-1]==0) {                  if(length==JPEG_EXIF_DATE_CHARS && isdigit((unsigned char)cstr[0]) && cstr[length-1]==0) {
                         char cstr_writable[JPEG_EXIF_DATE_CHARS];  
                         strcpy(cstr_writable, cstr);  
   
                         try {                          try {
                                 tm tmIn=cstr_to_time_t(cstr_writable, 0);                                  tm tmIn=cstr_to_time_t(pa_strdup(cstr), 0);
                                 return new VDate(tmIn);                                  return new VDate(tmIn);
                         }                          }
                         catch(...) { /*ignore bad date times*/ }                          catch(...) { /*ignore bad date times*/ }
Line 441  static Value* parse_IFD_entry_formatted_ Line 438  static Value* parse_IFD_entry_formatted_
         HashStringValue& hash=result->hash();          HashStringValue& hash=result->hash();
         for(uint i=0; i<components_count; i++, value+=component_size) {          for(uint i=0; i<components_count; i++, value+=component_size) {
                 hash.put(                  hash.put(
                         String::Body::Format(i),                          pa_uitoa(i),
                         parse_IFD_entry_formatted_one_value(is_big, format, component_size, value));                          parse_IFD_entry_formatted_one_value(is_big, format, component_size, value));
         }          }
   
Line 518  static void parse_IFD_entry(HashStringVa Line 515  static void parse_IFD_entry(HashStringVa
                 if(const char* name=(gps)?exif_gps_tag_value2name.get(tag):exif_tag_value2name.get(tag))                  if(const char* name=(gps)?exif_gps_tag_value2name.get(tag):exif_tag_value2name.get(tag))
                         hash.put(name, value);                          hash.put(name, value);
                 else                  else
                         hash.put(String::Body::Format(tag), value);                          hash.put(pa_uitoa(tag), value);
         }          }
 }  }
   
Line 1014  static void _measure(Request& r, MethodP Line 1011  static void _measure(Request& r, MethodP
         if(file_name=data.get_string()) {          if(file_name=data.get_string()) {
                 file_read_action_under_lock(r.full_disk_path(*file_name), "measure", file_measure_action, &info);                  file_read_action_under_lock(r.full_disk_path(*file_name), "measure", file_measure_action, &info);
         } else {          } else {
                 VFile* vfile=data.as_vfile(String::L_AS_IS);                  VFile* vfile=data.as_vfile();
                 file_name=&vfile->fields().get(name_name)->as_string();                  file_name=&vfile->fields().get(name_name)->as_string();
                 Measure_buf_reader reader(vfile->value_ptr(), vfile->value_size(), *file_name);                  Measure_buf_reader reader(vfile->value_ptr(), vfile->value_size(), *file_name);
                 measure(*file_name, reader, info);                  measure(*file_name, reader, info);

Removed from v.1.181  
changed lines
  Added in v.1.185


E-mail: