Comments (12)
--- a/src/exiv2.cc
+++ b/src/exiv2.cc
@@ -62,6 +62,11 @@
#include "misc.h"
+#if EXIV2_TEST_VERSION(0,28,0)
+#define AnyError Error
+#define AutoPtr UniquePtr
+#endif
+
typedef struct _AltKey AltKey;
struct _AltKey
@@ -174,7 +179,7 @@ public:
{
cp_data_ = NULL;
cp_length_ = 0;
- image_ = image;
+ image_ = std::move(image);
valid_ = TRUE;
}
@@ -364,7 +369,11 @@ public:
Exiv2::Image *image = imageData_->image();
#ifdef HAVE_EXIV2_ERROR_CODE
+#if EXIV2_TEST_VERSION(0,28,0)
+ if (!image) throw Exiv2::Error(Exiv2::ErrorCode::kerInputDataReadFailed);
+#else
if (!image) throw Exiv2::Error(Exiv2::kerInputDataReadFailed);
+#endif
#else
if (!image) throw Exiv2::Error(21);
#endif
@@ -839,7 +848,11 @@ gint exif_item_get_integer(ExifItem *item, gint *value)
{
try {
if (!item || exif_item_get_elements(item) == 0) return 0;
+#if EXIV2_TEST_VERSION(0,28,0)
+ *value = ((Exiv2::Metadatum *)item)->toInt64();
+#else
*value = ((Exiv2::Metadatum *)item)->toLong();
+#endif
return 1;
}
catch (Exiv2::AnyError& e) {
@@ -1224,10 +1237,17 @@ guchar *exif_get_preview(ExifData *exif, guint *data_len, gint requested_width,
Exiv2::PreviewImage image = pm.getPreviewImage(*pos);
Exiv2::DataBuf buf = image.copy();
+#if EXIV2_TEST_VERSION(0,28,0)
+ *data_len = buf.size();
+ auto b = buf.data();
+ buf.reset();
+ return b;
+#else
std::pair<Exiv2::byte*, long> p = buf.release();
*data_len = p.second;
return p.first;
+#endif
}
return NULL;
}
from geeqie.
Thanks for your help @neheb .
I cannot even get past the headers - I get:
/usr/local/include/exiv2/error.hpp:56:16: error: variable ‘Exiv2::EXIV2API Exiv2::LogMsg’ has initializer but incomplete type
and then everything fails...
I do not have a good feeling about this.
from geeqie.
I haven't taken a close look, but "initializer but incomplete type" means that the type is being used in a context where it needs to be fully defined, but the compiler doesn't see a full definition yet at that point.
This is a pure guess, but I'm guessing that error.hpp
relies on a type that's defined in log.hpp
or something, but doesn't actually #include
that dependency, and it probably wasn't noticed because everywhere else that uses it also includes log.hpp
first.
from geeqie.
(That is, just by the signature, this looks like an exiv2 bug)
from geeqie.
Weird.
mkdir subprojects
meson wrap install exiv2
meson setup --wrap_mode=forcefallback build
meson compile -C build
Should result in a successful build.
edit: this project looks like it needs some clang-tidy cleanups.
from geeqie.
Thanks @neheb . I can now compile the project. But....
With the exif window open and viewing a certain type of file there is a crash. It happens with NEF files from my camera, but not with NEF test images downloaded from the Internet.
Attached is the log file and a sample image. If anyone can easily see the problem, that is good. Otherwise it will take me a while (or longer) to find the problem.
log3.txt.gz
2019-12-23-11:21:44-DSC_3328.NEF.gz
from geeqie.
Sounds like an upstream issue
from geeqie.
Compilation is ok, but the seg. fault with some .nef files remains.
from geeqie.
Some nef files.
Probably should submit a bug report upstream.
from geeqie.
I have raised an issue at exiv2: Exiv2/exiv2#2638
If I knew anything about c++, things would be easier....
from geeqie.
since this project is C++ as well, probably should use clang-tidy.
from geeqie.
Fixed in commit c45cca7
from geeqie.
Related Issues (20)
- Geeqie crashes if double-clicked on empty space in file list
- JXL file is not in the file list HOT 2
- Sort by Number missing from Sort method menu HOT 2
- What is this narrow useless window? HOT 18
- Unable to build with webp-pixbuf-loader on non-Debian systems
- New window behavior HOT 6
- Remember last file grouping mode HOT 12
- Fullscreen is not actually full HOT 3
- Installation with `--prefix=$HOME/.local` requires the access to system directories HOT 3
- Geeqie exits when overwriting an image file being displayed HOT 5
- Control split view from command line HOT 9
- "Confirm move files to trash" not working HOT 1
- Dragging a keyword to another position causes Geeqie to crash.
- with marks selected, toggling a mark and then reselecting marks unmarks all marks HOT 6
- webp images load as black even with every prerequisite being green during compile HOT 2
- crash/segfault when enabling thumbnails HOT 1
- NetBSD: setenv() missing HOT 1
- Extremely laggy file move. [patch attached] HOT 2
- Better thumb loading logic
- Window Layouts with vertical split are shifted to the left if they are narrower than the application menu HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geeqie.