#1034 Added samples/toexv This is a first step to write exif metadata to memory to send to a web service.
This commit is contained in:
parent
3ecfd5220e
commit
664af57e10
3
Makefile
3
Makefile
@ -101,7 +101,8 @@ bugtest bugstest testbugs bugfixes:
|
||||
addmoddel exifcomment exifvalue httptest iptctest mmap-test stringto-test \
|
||||
exifdata iotest key-test path-test taglist write2-test write-test \
|
||||
convert-test exifdata-test exiv2json iptceasy largeiptc-test prevtest tiff-test \
|
||||
easyaccess-test geotag iptcprint metacopy werror-test xmpparser-test xmpsample xmpparse :
|
||||
easyaccess-test geotag iptcprint metacopy toexv werror-test \
|
||||
xmpparser-test xmpsample xmpparse :
|
||||
cd samples && $(MAKE) $(MAKECMDGOALS)
|
||||
|
||||
MAJOR=$(shell grep "define.*EXIV2_.*_VERSION .*\\d*" src/version.hpp | grep MAJOR | sed -e 's/EXIV2//g' | tr -dC [:digit:])
|
||||
|
||||
@ -101,7 +101,8 @@ bugtest bugstest testbugs bugfixes:
|
||||
addmoddel exifcomment exifvalue httptest iptctest mmap-test stringto-test \
|
||||
exifdata iotest key-test path-test taglist write2-test write-test \
|
||||
convert-test exifdata-test exiv2json iptceasy largeiptc-test prevtest tiff-test \
|
||||
easyaccess-test geotag iptcprint metacopy werror-test xmpparser-test xmpsample xmpparse :
|
||||
easyaccess-test geotag iptcprint metacopy toexv werror-test \
|
||||
xmpparser-test xmpsample xmpparse :
|
||||
cd samples && $(MAKE) $(MAKECMDGOALS)
|
||||
|
||||
MAJOR=$(shell grep "define.*EXIV2_.*_VERSION .*\\d*" src/version.hpp | grep MAJOR | sed -e 's/EXIV2//g' | tr -dC [:digit:])
|
||||
|
||||
@ -235,10 +235,15 @@ namespace Exiv2 {
|
||||
*/
|
||||
virtual void setIccProfile(DataBuf& iccProfile);
|
||||
/*!
|
||||
@brief Erase iccProfile. the profile isnot not removed from
|
||||
@brief Erase iccProfile. the profile is not removed from
|
||||
the actual image until the writeMetadata() method is called.
|
||||
*/
|
||||
virtual void clearIccProfile();
|
||||
|
||||
/*!
|
||||
@brief return iccProfile
|
||||
*/
|
||||
virtual DataBuf* iccProfile() { return &iccProfile_; }
|
||||
/*!
|
||||
@brief Copy all existing metadata from source Image. The data is
|
||||
copied into internal buffers and is not written to the image
|
||||
|
||||
@ -112,7 +112,7 @@ namespace Exiv2 {
|
||||
enum WriteMethod { wmIntrusive, wmNonIntrusive };
|
||||
|
||||
//! An identifier for each type of metadata
|
||||
enum MetadataId { mdNone=0, mdExif=1, mdIptc=2, mdComment=4, mdXmp=8 };
|
||||
enum MetadataId { mdNone=0, mdExif=1, mdIptc=2, mdComment=4, mdXmp=8, mdIccProfile=16 };
|
||||
|
||||
//! An identifier for each mode of metadata support
|
||||
enum AccessMode { amNone=0, amRead=1, amWrite=2, amReadWrite=3 };
|
||||
|
||||
@ -87,7 +87,8 @@ BINSRC = addmoddel.cpp \
|
||||
OTHERSRC = exiv2json.cpp \
|
||||
geotag.cpp \
|
||||
metacopy.cpp \
|
||||
path-test.cpp
|
||||
path-test.cpp \
|
||||
toexv.cpp
|
||||
|
||||
# ******************************************************************************
|
||||
# Initialisations
|
||||
@ -167,7 +168,7 @@ geotag: %: %.cpp
|
||||
$(LIBTOOL) --mode=link $(LINK.cc) -lexpat $@.o -o ../bin/$@
|
||||
|
||||
# link applications which require utils.cpp support
|
||||
metacopy path-test: %: %.cpp ../src/utils.o
|
||||
metacopy path-test toexv: %: %.cpp ../src/utils.o
|
||||
$(COMPILE.cc) -I../src -I../include -I../include/exiv2 -o $@.o $<
|
||||
@$(MAKEDEPEND)
|
||||
@$(POSTDEPEND)
|
||||
|
||||
@ -212,6 +212,9 @@ namespace Exiv2 {
|
||||
if (checkMode(mdIptc) & amWrite) {
|
||||
setIptcData(image.iptcData());
|
||||
}
|
||||
if (checkMode(mdIccProfile) & amWrite && iccProfile()) {
|
||||
setIccProfile(*iccProfile());
|
||||
}
|
||||
if (checkMode(mdXmp) & amWrite) {
|
||||
setXmpPacket(image.xmpPacket());
|
||||
setXmpData(image.xmpData());
|
||||
@ -391,6 +394,8 @@ namespace Exiv2 {
|
||||
case mdComment:
|
||||
am = r->commentSupport_;
|
||||
break;
|
||||
case mdIccProfile: break;
|
||||
|
||||
// no default: let the compiler complain
|
||||
}
|
||||
return am;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user