Giter Club home page Giter Club logo

goexiv's People

Contributors

abustany avatar antonsergeyev avatar dchesterton avatar gitschneider avatar oderwat avatar rtio avatar toaster avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

oderwat rtio sanmai

goexiv's Issues

Iptc read data missing

When I read a jpg file and get it iptc metadata with the key "Iptc.Application2.Keywords"
It should be a stringlist or at least "a,b,c...,y,z"
but I only get "z"

Compilation issues with goexiv library

Hello,

With exiv2 0.28.0

I encountered an issue while trying to compile the goexiv library. I am receiving numerous errors related to the helper.cpp file. I'm not familiar with C++, but if the error is not too complex and some guidance can be provided, I am willing to attempt a PR to fix the issue. Below are the errors I am encountering:

helper.cpp:22:50: error: expected ‘)’ before ‘image’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      |                                                  ^~~~~
helper.cpp:10:30: note: in definition of macro ‘DEFINE_STRUCT’
   10 |         _##name(wrapped_type member_name) \
      |                              ^~~~~~~~~~~
helper.cpp:10:16: note: to match this ‘(’
   10 |         _##name(wrapped_type member_name) \
      |                ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:22:41: error: ‘AutoPtr’ in ‘class Exiv2::Image’ does not name a type
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      |                                         ^~~~~~~
helper.cpp:12:9: note: in definition of macro ‘DEFINE_STRUCT’
   12 |         wrapped_type member_name; \
      |         ^~~~~~~~~~~~
helper.cpp: In constructor ‘_Exiv2Error::_Exiv2Error(const Exiv2::Error&)’:
helper.cpp:60:26: error: cannot convert ‘Exiv2::ErrorCode’ to ‘int’ in initialization
   60 |         : code(error.code())
      |                ~~~~~~~~~~^~
      |                          |
      |                          Exiv2::ErrorCode
helper.cpp: In function ‘Exiv2Image* exiv2_image_factory_open(const char*, Exiv2Error**)’:
helper.cpp:71:67: error: no matching function for call to ‘_Exiv2Image::_Exiv2Image(Exiv2::Image::UniquePtr)’
   71 |                 p = new Exiv2Image(Exiv2::ImageFactory::open(path));
      |                                                                   ^
helper.cpp:9:8: note: candidate: ‘constexpr _Exiv2Image::_Exiv2Image()’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note:   candidate expects 0 arguments, 1 provided
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note: candidate: ‘constexpr _Exiv2Image::_Exiv2Image(const _Exiv2Image&)’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note:   no known conversion for argument 1 from ‘Exiv2::Image::UniquePtr’ {aka ‘std::unique_ptr<Exiv2::Image>’} to ‘const _Exiv2Image&’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note: candidate: ‘constexpr _Exiv2Image::_Exiv2Image(_Exiv2Image&&)’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note:   no known conversion for argument 1 from ‘Exiv2::Image::UniquePtr’ {aka ‘std::unique_ptr<Exiv2::Image>’} to ‘_Exiv2Image&&’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp: In function ‘Exiv2Image* exiv2_image_factory_open_bytes(const unsigned char*, long int, Exiv2Error**)’:
helper.cpp:90:74: error: no matching function for call to ‘_Exiv2Image::_Exiv2Image(Exiv2::Image::UniquePtr)’
   90 |                 p = new Exiv2Image(Exiv2::ImageFactory::open(bytes, size));
      |                                                                          ^
helper.cpp:9:8: note: candidate: ‘constexpr _Exiv2Image::_Exiv2Image()’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note:   candidate expects 0 arguments, 1 provided
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note: candidate: ‘constexpr _Exiv2Image::_Exiv2Image(const _Exiv2Image&)’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note:   no known conversion for argument 1 from ‘Exiv2::Image::UniquePtr’ {aka ‘std::unique_ptr<Exiv2::Image>’} to ‘const _Exiv2Image&’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note: candidate: ‘constexpr _Exiv2Image::_Exiv2Image(_Exiv2Image&&)’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp:9:8: note:   no known conversion for argument 1 from ‘Exiv2::Image::UniquePtr’ {aka ‘std::unique_ptr<Exiv2::Image>’} to ‘_Exiv2Image&&’
    9 | struct _##name { \
      |        ^
helper.cpp:22:1: note: in expansion of macro ‘DEFINE_STRUCT’
   22 | DEFINE_STRUCT(Exiv2Image, Exiv2::Image::AutoPtr, image);
      | ^~~~~~~~~~~~~
helper.cpp: In function ‘void exiv2_image_read_metadata(Exiv2Image*, Exiv2Error**)’:
helper.cpp:107:22: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  107 |                 img->image->readMetadata();
      |                      ^~~~~
helper.cpp: In function ‘void exiv2_image_set_exif_string(Exiv2Image*, char*, char*, Exiv2Error**)’:
helper.cpp:118:41: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  118 |         Exiv2::ExifData exifData = img->image->exifData();
      |                                         ^~~~~
helper.cpp:122:31: error: ‘AutoPtr’ is not a member of ‘Exiv2::Value’
  122 |                 Exiv2::Value::AutoPtr valueObject = Exiv2::Value::create(Exiv2::asciiString);
      |                               ^~~~~~~
helper.cpp:123:17: error: ‘valueObject’ was not declared in this scope
  123 |                 valueObject->read(value);
      |                 ^~~~~~~~~~~
helper.cpp:126:22: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  126 |                 img->image->setExifData(exifData);
      |                      ^~~~~
helper.cpp:127:22: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  127 |                 img->image->writeMetadata();
      |                      ^~~~~
helper.cpp: In function ‘void exiv2_image_set_exif_short(Exiv2Image*, char*, char*, Exiv2Error**)’:
helper.cpp:138:41: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  138 |         Exiv2::ExifData exifData = img->image->exifData();
      |                                         ^~~~~
helper.cpp:142:31: error: ‘AutoPtr’ is not a member of ‘Exiv2::Value’
  142 |                 Exiv2::Value::AutoPtr valueObject = Exiv2::Value::create(Exiv2::unsignedShort);
      |                               ^~~~~~~
helper.cpp:143:17: error: ‘valueObject’ was not declared in this scope
  143 |                 valueObject->read(value);
      |                 ^~~~~~~~~~~
helper.cpp:146:22: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  146 |                 img->image->setExifData(exifData);
      |                      ^~~~~
helper.cpp:147:22: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  147 |                 img->image->writeMetadata();
      |                      ^~~~~
helper.cpp: In function ‘void exiv2_image_set_iptc_string(Exiv2Image*, char*, char*, Exiv2Error**)’:
helper.cpp:158:41: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  158 |         Exiv2::IptcData iptcData = img->image->iptcData();
      |                                         ^~~~~
helper.cpp:165:22: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  165 |                 img->image->setIptcData(iptcData);
      |                      ^~~~~
helper.cpp:166:22: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  166 |                 img->image->writeMetadata();
      |                      ^~~~~
helper.cpp: In function ‘void exiv2_image_set_iptc_short(Exiv2Image*, char*, char*, Exiv2Error**)’:
helper.cpp:177:37: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  177 |     Exiv2::IptcData iptcData = img->image->iptcData();
      |                                     ^~~~~
helper.cpp:181:23: error: ‘AutoPtr’ is not a member of ‘Exiv2::Value’
  181 |         Exiv2::Value::AutoPtr valueObject = Exiv2::Value::create(Exiv2::unsignedShort);
      |                       ^~~~~~~
helper.cpp:182:9: error: ‘valueObject’ was not declared in this scope
  182 |         valueObject->read(value);
      |         ^~~~~~~~~~~
helper.cpp:185:14: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  185 |         img->image->setIptcData(iptcData);
      |              ^~~~~
helper.cpp:186:14: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  186 |         img->image->writeMetadata();
      |              ^~~~~
helper.cpp: In function ‘long int exiv_image_get_size(Exiv2Image*)’:
helper.cpp:197:23: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  197 |     return (long)img->image->io().size();
      |                       ^~~~~
helper.cpp: In function ‘unsigned char* exiv_image_get_bytes_ptr(Exiv2Image*)’:
helper.cpp:203:17: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  203 |     return img->image->io().mmap();
      |                 ^~~~~
helper.cpp: In function ‘int exiv2_image_get_pixel_width(Exiv2Image*)’:
helper.cpp:210:21: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  210 |         return img->image->pixelWidth();
      |                     ^~~~~
helper.cpp: In function ‘int exiv2_image_get_pixel_height(Exiv2Image*)’:
helper.cpp:214:21: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  214 |         return img->image->pixelHeight();
      |                     ^~~~~
helper.cpp: In function ‘const unsigned char* exiv2_image_icc_profile(Exiv2Image*)’:
helper.cpp:219:18: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  219 |         if (img->image->iccProfileDefined()) {
      |                  ^~~~~
helper.cpp:220:29: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  220 |                 return img->image->iccProfile()->pData_;
      |                             ^~~~~
helper.cpp: In function ‘long int exiv2_image_icc_profile_size(Exiv2Image*)’:
helper.cpp:227:18: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  227 |         if (img->image->iccProfileDefined()) {
      |                  ^~~~~
helper.cpp:228:29: error: ‘Exiv2Image’ {aka ‘struct _Exiv2Image’} has no member named ‘image’
  228 |                 return img->image->iccProfile()->size_;
      |                             ^~~~~
helper.cpp: In function ‘Exiv2XmpData* exiv2_image_get_xmp_data(const Exiv2Image*)’:
helper.cpp:237:38: error: ‘const Exiv2Image’ {aka ‘const struct _Exiv2Image’} has no member named ‘image’
  237 |         return new Exiv2XmpData(img->image->xmpData());
      |                                      ^~~~~
helper.cpp: In function ‘Exiv2IptcData* exiv2_image_get_iptc_data(const Exiv2Image*)’:
helper.cpp:284:39: error: ‘const Exiv2Image’ {aka ‘const struct _Exiv2Image’} has no member named ‘image’
  284 |         return new Exiv2IptcData(img->image->iptcData());
      |                                       ^~~~~
helper.cpp: In function ‘Exiv2ExifData* exiv2_image_get_exif_data(const Exiv2Image*)’:
helper.cpp:354:39: error: ‘const Exiv2Image’ {aka ‘const struct _Exiv2Image’} has no member named ‘image’
  354 |         return new Exiv2ExifData(img->image->exifData());
      |                                       ^~~~~

Please let me know if you have any suggestions or guidance on how to approach this issue, and if there are any additional details needed.

Thank you!

Short values related to IPTC cannot be written

Short values related to IPTC cannot be written
Iptc.Application2.RecordVersion
Iptc.Envelope.ModelVersion
etc

// Does not result in an error
err :=rimg.SetIptcString(v.Key, v.Value)
if err != nil {
dlog.Println(err.Error())
return
}

I was able to write a character string

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.