diff --git a/ChangeLog b/ChangeLog index 3b1609b6..974c58cc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 1/1/16 started 8.2.1 - add a compat stub, thanks Benjamin - python bandjoin is now just an instance function +- small doc improvements 7/10/15 started 8.2.0 - added im_bufmagick2vips(), a vips7 wrapper for magick load from buffer diff --git a/doc/using-cpp.xml b/doc/using-cpp.xml index a83c277b..2c1f2e77 100644 --- a/doc/using-cpp.xml +++ b/doc/using-cpp.xml @@ -310,6 +310,49 @@ VImage VImage::sin( VOption *options = 0 ); + + Image metadata + + + VIPS images can have a lot of metadata attached to them, giving things + like ICC profiles, EXIF data, and so on. You can use the command-line + program vipsheader with the -a flag to list + all the fields. + + + + You can read metadata items with the member functions + get_int(), get_double(), + get_string() and get_blob(). Use + get_typeof() to call vips_image_get_typeof() and read the + type of an item. This will return 0 for undefined fields. + + +const char *VImage::get_string( const char *field ) throw( VError ); + + + + + You can use the set() family of overloaded members to set + metadata, for example: + + +void VImage::set( const char *field, const char *value ); + + + + + You can use these functions to manipulate exif metadata, for example: + + +VImage im = VImage::new_from_file( "x.jpg" ) +int orientation = atoi( im.get_string( "exif-ifd0-Orientation" ) ); +im.set( "exif-ifd0-Orientation", "2" ); +im.write_to_file( "y.jpg" ); + + + + Extending the C++ interface