Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 254049 | Differences between
and this patch

Collapse All | Expand All

(-)src/imageutils/jpegcontent.cpp.orig (+21 lines)
Lines 47-52 Link Here
47
#include "imageutils/jpegcontent.h"
47
#include "imageutils/jpegcontent.h"
48
#include "imageutils/jpegerrormanager.h"
48
#include "imageutils/jpegerrormanager.h"
49
49
50
// Make sure an EXIV2_TEST_VERSION macro exists:
51
52
#ifdef EXIV2_VERSION
53
#    ifndef EXIV2_TEST_VERSION
54
#        define EXIV2_TEST_VERSION(major,minor,patch) \
55
         ( EXIV2_VERSION >= EXIV2_MAKE_VERSION(major,minor,patch) )
56
#    endif
57
#else
58
#    define EXIV2_TEST_VERSION(major,minor,patch) (false)
59
#endif
60
50
namespace ImageUtils {
61
namespace ImageUtils {
51
62
52
const int INMEM_DST_DELTA=4096;
63
const int INMEM_DST_DELTA=4096;
Lines 589-595 Link Here
589
QImage JPEGContent::thumbnail() const {
600
QImage JPEGContent::thumbnail() const {
590
	QImage image;
601
	QImage image;
591
	if (!d->mExifData.empty()) {
602
	if (!d->mExifData.empty()) {
603
#if (EXIV2_TEST_VERSION(0,17,91))
604
		Exiv2::ExifThumbC thumb(d->mExifData);
605
		Exiv2::DataBuf const thumbnail = thumb.copy();
606
#else
592
		Exiv2::DataBuf thumbnail = d->mExifData.copyThumbnail();
607
		Exiv2::DataBuf thumbnail = d->mExifData.copyThumbnail();
608
#endif
593
		image.loadFromData(thumbnail.pData_, thumbnail.size_);
609
		image.loadFromData(thumbnail.pData_, thumbnail.size_);
594
	}
610
	}
595
	return image;
611
	return image;
Lines 611-617 Link Here
611
		return;
627
		return;
612
	}
628
	}
613
	
629
	
630
#if (EXIV2_TEST_VERSION(0,17,91))
631
	Exiv2::ExifThumb thumb(d->mExifData);
632
	thumb.setJpegThumbnail((unsigned char*)array.data(), array.size());
633
#else
614
	d->mExifData.setJpegThumbnail((unsigned char*)array.data(), array.size());
634
	d->mExifData.setJpegThumbnail((unsigned char*)array.data(), array.size());
635
#endif
615
}
636
}
616
637
617
638

Return to bug 254049