|
|
|
@ -749,7 +749,7 @@ TQImage KExiv2::getExifThumbnail(bool fixOrientation) const
|
|
|
|
|
#else
|
|
|
|
|
long orientation = it->toLong();
|
|
|
|
|
#endif
|
|
|
|
|
tqDebug("Exif Thumbnail Qt::Orientation: %i", (int)orientation);
|
|
|
|
|
tqDebug("Exif Thumbnail Orientation: %i", (int)orientation);
|
|
|
|
|
|
|
|
|
|
switch (orientation)
|
|
|
|
|
{
|
|
|
|
@ -872,7 +872,7 @@ KExiv2::ImageOrientation KExiv2::getImageOrientation() const
|
|
|
|
|
#else
|
|
|
|
|
orientation = it->toLong();
|
|
|
|
|
#endif
|
|
|
|
|
tqDebug("Minolta Makernote Qt::Orientation: %i", (int)orientation);
|
|
|
|
|
tqDebug("Minolta Makernote Orientation: %i", (int)orientation);
|
|
|
|
|
switch(orientation)
|
|
|
|
|
{
|
|
|
|
|
case 76:
|
|
|
|
@ -895,7 +895,7 @@ KExiv2::ImageOrientation KExiv2::getImageOrientation() const
|
|
|
|
|
#else
|
|
|
|
|
orientation = it->toLong();
|
|
|
|
|
#endif
|
|
|
|
|
tqDebug("Minolta Makernote Qt::Orientation: %i", (int)orientation);
|
|
|
|
|
tqDebug("Minolta Makernote Orientation: %i", (int)orientation);
|
|
|
|
|
switch(orientation)
|
|
|
|
|
{
|
|
|
|
|
case 76:
|
|
|
|
@ -921,13 +921,13 @@ KExiv2::ImageOrientation KExiv2::getImageOrientation() const
|
|
|
|
|
#else
|
|
|
|
|
orientation = it->toLong();
|
|
|
|
|
#endif
|
|
|
|
|
tqDebug("Exif Qt::Orientation: %i", (int)orientation);
|
|
|
|
|
tqDebug("Exif Orientation: %i", (int)orientation);
|
|
|
|
|
return (ImageOrientation)orientation;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch( Exiv2::Error &e )
|
|
|
|
|
{
|
|
|
|
|
d->printExiv2ExceptionError("Cannot parse Exif Qt::Orientation tag using Exiv2 ", e);
|
|
|
|
|
d->printExiv2ExceptionError("Cannot parse Exif Orientation tag using Exiv2 ", e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ORIENTATION_UNSPECIFIED;
|
|
|
|
@ -995,7 +995,7 @@ bool KExiv2::setImageOrientation(ImageOrientation orientation, bool setProgramNa
|
|
|
|
|
}
|
|
|
|
|
catch( Exiv2::Error &e )
|
|
|
|
|
{
|
|
|
|
|
d->printExiv2ExceptionError("Cannot set Exif Qt::Orientation tag using Exiv2 ", e);
|
|
|
|
|
d->printExiv2ExceptionError("Cannot set Exif Orientation tag using Exiv2 ", e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
@ -1083,7 +1083,7 @@ TQDateTime KExiv2::getImageDateTime() const
|
|
|
|
|
|
|
|
|
|
if (it2 != exifData.end())
|
|
|
|
|
{
|
|
|
|
|
TQDateTime dateTime = TQDateTime::fromString(it2->toString().c_str(), Qt::ISODate);
|
|
|
|
|
TQDateTime dateTime = TQDateTime::fromString(it2->toString().c_str(), TQt::ISODate);
|
|
|
|
|
|
|
|
|
|
if (dateTime.isValid())
|
|
|
|
|
{
|
|
|
|
@ -1099,7 +1099,7 @@ TQDateTime KExiv2::getImageDateTime() const
|
|
|
|
|
|
|
|
|
|
if (it3 != exifData.end())
|
|
|
|
|
{
|
|
|
|
|
TQDateTime dateTime = TQDateTime::fromString(it3->toString().c_str(), Qt::ISODate);
|
|
|
|
|
TQDateTime dateTime = TQDateTime::fromString(it3->toString().c_str(), TQt::ISODate);
|
|
|
|
|
|
|
|
|
|
if (dateTime.isValid())
|
|
|
|
|
{
|
|
|
|
@ -1115,7 +1115,7 @@ TQDateTime KExiv2::getImageDateTime() const
|
|
|
|
|
|
|
|
|
|
if (it != exifData.end())
|
|
|
|
|
{
|
|
|
|
|
TQDateTime dateTime = TQDateTime::fromString(it->toString().c_str(), Qt::ISODate);
|
|
|
|
|
TQDateTime dateTime = TQDateTime::fromString(it->toString().c_str(), TQt::ISODate);
|
|
|
|
|
|
|
|
|
|
if (dateTime.isValid())
|
|
|
|
|
{
|
|
|
|
@ -1146,8 +1146,8 @@ TQDateTime KExiv2::getImageDateTime() const
|
|
|
|
|
{
|
|
|
|
|
TQString IptcTimeCreated(it2->toString().c_str());
|
|
|
|
|
|
|
|
|
|
TQDate date = TQDate::fromString(IptcDateCreated, Qt::ISODate);
|
|
|
|
|
TQTime time = TQTime::fromString(IptcTimeCreated, Qt::ISODate);
|
|
|
|
|
TQDate date = TQDate::fromString(IptcDateCreated, TQt::ISODate);
|
|
|
|
|
TQTime time = TQTime::fromString(IptcTimeCreated, TQt::ISODate);
|
|
|
|
|
TQDateTime dateTime = TQDateTime(date, time);
|
|
|
|
|
|
|
|
|
|
if (dateTime.isValid())
|
|
|
|
@ -1174,8 +1174,8 @@ TQDateTime KExiv2::getImageDateTime() const
|
|
|
|
|
{
|
|
|
|
|
TQString IptcTimeDigitization(it4->toString().c_str());
|
|
|
|
|
|
|
|
|
|
TQDate date = TQDate::fromString(IptcDateDigitization, Qt::ISODate);
|
|
|
|
|
TQTime time = TQTime::fromString(IptcTimeDigitization, Qt::ISODate);
|
|
|
|
|
TQDate date = TQDate::fromString(IptcDateDigitization, TQt::ISODate);
|
|
|
|
|
TQTime time = TQTime::fromString(IptcTimeDigitization, TQt::ISODate);
|
|
|
|
|
TQDateTime dateTime = TQDateTime(date, time);
|
|
|
|
|
|
|
|
|
|
if (dateTime.isValid())
|
|
|
|
@ -1220,8 +1220,8 @@ bool KExiv2::setImageDateTime(const TQDateTime& dateTime, bool setDateTimeDigiti
|
|
|
|
|
|
|
|
|
|
// In Second we write date & time into Iptc.
|
|
|
|
|
|
|
|
|
|
const std::string &iptcdate(TQString(dateTime.date().toString(Qt::ISODate)).ascii());
|
|
|
|
|
const std::string &iptctime(TQString(dateTime.time().toString(Qt::ISODate)).ascii());
|
|
|
|
|
const std::string &iptcdate(TQString(dateTime.date().toString(TQt::ISODate)).ascii());
|
|
|
|
|
const std::string &iptctime(TQString(dateTime.time().toString(TQt::ISODate)).ascii());
|
|
|
|
|
d->iptcMetadata["Iptc.Application2.DateCreated"] = iptcdate;
|
|
|
|
|
d->iptcMetadata["Iptc.Application2.TimeCreated"] = iptctime;
|
|
|
|
|
if(setDateTimeDigitized)
|
|
|
|
|