This caused garbage to be returned when we attempted to use the path to
determine if the file is a RAW image. Now, RAWs are detected properly
and the proper full-res previews are used.
Signed-off-by: Solomon Peachy <pizza@shaftnet.org>
Signed-off-by: Klaus Ethgen <Klaus@Ethgen.de>
unsigned char *cp_data_;
guint cp_length_;
gboolean valid_;
unsigned char *cp_data_;
guint cp_length_;
gboolean valid_;
Exiv2::ExifData emptyExifData_;
Exiv2::IptcData emptyIptcData_;
Exiv2::ExifData emptyExifData_;
Exiv2::IptcData emptyIptcData_;
cp_length_ = 0;
valid_ = TRUE;
cp_length_ = 0;
valid_ = TRUE;
- gchar *pathl = path_from_utf8(path);
+ pathl_ = path_from_utf8(path);
- image_ = Exiv2::ImageFactory::open(pathl);
+ image_ = Exiv2::ImageFactory::open(pathl_);
// g_assert (image.get() != 0);
image_->readMetadata();
// g_assert (image.get() != 0);
image_->readMetadata();
}
virtual ~_ExifDataOriginal()
{
if (cp_data_) g_free(cp_data_);
}
virtual ~_ExifDataOriginal()
{
if (cp_data_) g_free(cp_data_);
+ if (pathl_) g_free(pathl_);
}
virtual Exiv2::Image *image()
}
virtual Exiv2::Image *image()
if (!exif->image()) return NULL;
if (!exif->image()) return NULL;
- const char* path = exif->image()->io().path().c_str();
/* given image pathname, first do simple (and fast) file extension test */
/* given image pathname, first do simple (and fast) file extension test */
- gboolean is_raw = filter_file_class(path, FORMAT_CLASS_RAWIMAGE);
+ gboolean is_raw = filter_file_class(exif->image()->io().path().c_str(), FORMAT_CLASS_RAWIMAGE);
if (!is_raw && requested_width == 0) return NULL;
if (!is_raw && requested_width == 0) return NULL;