Comments (21)
I think this may be relevant:
aruiz/webp-pixbuf-loader#73
From the Geeqie point of view, I see that the "update area" signal is not happening - therefore no data.
from geeqie.
It looks my webp-pixbuf-loader patch in aruiz/webp-pixbuf-loader#73 doesn't fix this geeqie issue.
After several try-and-errors, it looks geeqie assumes:
PixbufModulePreparedFunc
should be called after pixbuf is prepared and before loaded data is copied into the pixbufPixbufModuleUpdatedFunc
should be called after loaded data is copied into the pixbuf
My patch in aruiz/webp-pixbuf-loader#73 calls PixbufModulePreparedFunc
after loaded data is decoded into the pixbuf so it doesn't help the geeqie case. (though I have not checked API documents of GdkPixbuf)
The attached patch against webp-pixbuf-loader 0.2.4 seems to fix geeqie this "webp images show up as black" problem. Could anyone try this? (not sure what's should be done in is_animation case)
diff --git a/io-webp.c b/io-webp.c
index c67e0a9..de2f83a 100644
--- a/io-webp.c
+++ b/io-webp.c
@@ -143,6 +143,8 @@ stop_load (gpointer data, GError **error)
{
if (context->prepare_func)
context->prepare_func (pb, GDK_PIXBUF_ANIMATION (anim), context->user_data);
+ if (context->update_func)
+ context->update_func (pb, 0, 0, context->width, context->height, context->user_data);
ret = TRUE;
}
@@ -174,6 +176,9 @@ stop_load (gpointer data, GError **error)
return FALSE;
}
+ if (context->prepare_func)
+ context->prepare_func (pb, NULL, context->user_data);
+
if (icc_data)
{
gdk_pixbuf_set_option (pb, "icc-profile", icc_data);
@@ -187,10 +192,8 @@ stop_load (gpointer data, GError **error)
context->buffer->len, &config);
if (status == VP8_STATUS_OK)
{
- if (context->prepare_func)
- context->prepare_func (pb, NULL, context->user_data);
-
- g_clear_object (&pb);
+ if (context->update_func)
+ context->update_func (pb, 0, 0, context->width, context->height, context->user_data);
ret = TRUE;
}
@@ -198,6 +201,8 @@ stop_load (gpointer data, GError **error)
g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED,
"WebP decoder failed with VP8 status code: %d", status);
}
+
+ g_clear_object (&pb);
}
if (context->buffer)
Thanks,
from geeqie.
It looks my webp-pixbuf-loader patch in aruiz/webp-pixbuf-loader#73 doesn't fix this geeqie issue. After several try-and-errors, it looks geeqie assumes:
PixbufModulePreparedFunc
should be called after pixbuf is prepared and before loaded data is copied into the pixbufPixbufModuleUpdatedFunc
should be called after loaded data is copied into the pixbufMy patch in aruiz/webp-pixbuf-loader#73 calls
PixbufModulePreparedFunc
after loaded data is decoded into the pixbuf so it doesn't help the geeqie case. (though I have not checked API documents of GdkPixbuf)The attached patch against webp-pixbuf-loader 0.2.4 seems to fix geeqie this "webp images show up as black" problem. Could anyone try this? (not sure what's should be done in is_animation case)
diff --git a/io-webp.c b/io-webp.c index c67e0a9..de2f83a 100644 --- a/io-webp.c +++ b/io-webp.c @@ -143,6 +143,8 @@ stop_load (gpointer data, GError **error) { if (context->prepare_func) context->prepare_func (pb, GDK_PIXBUF_ANIMATION (anim), context->user_data); + if (context->update_func) + context->update_func (pb, 0, 0, context->width, context->height, context->user_data); ret = TRUE; } @@ -174,6 +176,9 @@ stop_load (gpointer data, GError **error) return FALSE; } + if (context->prepare_func) + context->prepare_func (pb, NULL, context->user_data); + if (icc_data) { gdk_pixbuf_set_option (pb, "icc-profile", icc_data); @@ -187,10 +192,8 @@ stop_load (gpointer data, GError **error) context->buffer->len, &config); if (status == VP8_STATUS_OK) { - if (context->prepare_func) - context->prepare_func (pb, NULL, context->user_data); - - g_clear_object (&pb); + if (context->update_func) + context->update_func (pb, 0, 0, context->width, context->height, context->user_data); ret = TRUE; } @@ -198,6 +201,8 @@ stop_load (gpointer data, GError **error) g_set_error (error, GDK_PIXBUF_ERROR, GDK_PIXBUF_ERROR_FAILED, "WebP decoder failed with VP8 status code: %d", status); } + + g_clear_object (&pb); } if (context->buffer)Thanks,
This patch fixed the issue for me. Thanks.
from geeqie.
Embedded libraries are not good:
https://wiki.debian.org/UpstreamGuide#No_inclusion_of_third_party_code
If you do include your patched libwebp, please make an option to build without it and use the users local version.
I fully understand that you want to fix the problem (and as soon as possible), but a problem in webp should be solved in webp, and not in geeqie.
from geeqie.
Yes, it is the 0.2.2 commit.
from geeqie.
The version I have is 0.0.5-5 - which the one installed by default for Ubuntu.
Running gdk-pixbuf-query-loaders, which installed on my computer at;
/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/gdk-pixbuf-query-loaders
will tell you if webp is supported.
from geeqie.
as I said, test program works, which means I have webp support in pixbuf.
webp is enabled in geeqie Preferences > File types
.
from geeqie.
Is webp in the list in Edit/Preferences/Advanced/Usable File Types?
Is the black background the value you have set in Edit/Preferences/Image/Appearance/Border Color?
from geeqie.
Yes, webp is in Usable File Types.
I had black as the Border Color. If I change to purple, webp images look like this in full screen:
from geeqie.
The problem starts at 0.2.2 of webp-pixbuf-loader - that does not help much as I do not see where the problem is.
from geeqie.
did you attempt git bisect
to find the first troublesome commit?
from geeqie.
Any news about this?
I can confirm, 0.2.1 is working well, 0.2.2 and 0.2.4 doesn't work (black screen)
from geeqie.
Can this bug also be fixed on V2.1 by cherry-picking 4b15931?
How far is current master from being considered stable / worthy of a V2.2 release?
from geeqie.
Commit 4b15931 does not show webp animations (but webp-pixbuf-loader does).
v2.1 was released in June, so maybe it is too soon for v2,2.
I do not know how the package maintainers feel about issuing v2.1.1 for this problem. @gusnan is the Debian maintainer for Geeqie - maybe he has an opinion.
from geeqie.
There is the possibility to include the webp-pixbuf-loader as a meson sub-project.
A sub-project does not include additional code, but uses a link the the additional project.
It is then possible to patch the sub-project to fix this bug, prior to compiling.
Webp animations would then be displayed.
A slight problem is that the webp-pixbuf-loader project has increased the required version of libwebp to 1.3. This has been done because of a vulnerability in libwebp.
That gives a problem for Geeqie, because Geeqie uses GitHub Actions which run on Ubuntu 20.04 and does not have this library version.
It is possibly to patch the webp-pixbuf-loader meson file to use an earlier version. I do not see this as a problem because Geeqie uses libwebp 1.2.4 anyway.
Maybe I will include this in the source anyway - then users who compile from sources or use AppImages will have webp animations.
from geeqie.
@caclark Well, my opinion is - release early, release often. If a new version requires an increased version of libwebp, that's fine - in worst case I cannot build (on stable) with the webp, but packaging is on unstable, and there libraries come (if not at once, then pretty soon depending on the library). We wouldn't want upstreams to avoid features just to make the package build on older library versions to make them easier to backport - It might be fine in some cases to avoid increasing library version requirements, but I fully understand that you'll want new (modern?) features into the program.
from geeqie.
@gusnan
Commit 29f5a35 uses https://github.com/aruiz/webp-pixbuf-loader.git as a subproject, and then patches the sources to fix this bug. Animated webp files are displayed also.
It was necessary to mess around with the installation process because Geeqie goes under /usr/local
but the pixbuf loader goes under /usr
.
This patch can be put in a v2.1.1 release, or not, or whichever....
from geeqie.
@gusnan Sorry - I was aware of that paragraph but misinterpreted the words "inside your source archive,"
Commit 69929c6 is yet another attempt. There is an additional option -Dsubprojects=true|false
, which defaults to "true".
There will be a problem for people who have loader version 0.24 but who will not use subprojects. Webp images will not be displayed.
The only way to fix this (other than the loader source being updated) is to include the image-load-wepp.cc source again - that just gets more complicated to include use of that as an option. I can do that if necessary.
from geeqie.
The webp loader:
https://github.com/aruiz/webp-pixbuf-loader
is still the sticking point.
Individual users can get webp images (but not animated) displayed via the external preview option in Edit/Preferences/Advanced
.
e.g. Using ImageMagick's convert
or mogrify
.
from geeqie.
FYI, Eye of GNOME (which, based on Debian bug report, is using webp-pixbuf-loader) can display webp images. Perhaps looking at its source code can be helpful.
from geeqie.
Fixed in commit b765d90
from geeqie.
Related Issues (20)
- Geeqie cuts part of the folder view, navigation almost impossible. HOT 1
- 2.3 release failed to build on macos HOT 3
- Since upgrading, geeqie has forgotten my sort settings, and won't remember them HOT 1
- tar.xz contains symlinks that are wrong for plugins HOT 3
- AppImage doesn't distribute libffmpegthumbnailer
- Cut image to clipboard HOT 1
- Automatically hide image overlay in fullscreen mode HOT 2
- geeqie --remote options not clear to me HOT 2
- Remote --cache-maintenance causes out-of-memory
- Zoom with mouse wheel without Ctl HOT 2
- Window not shown at startup when save_window_workspace = "true" HOT 2
- remove subfolder
- trying to remove folder with completely hidden `.thumbnails` folder silently fails HOT 1
- Panview display corruption on high-dpi with 2x window scaling HOT 6
- Can't open my old collections sensibly. HOT 2
- Collections silently truncated HOT 1
- allow list of images (not paths) to be specified as command arguments HOT 3
- opening multiple geeqies causes the Files&Folders settings to be forgotten/ignored HOT 6
- Add image Crop functionality HOT 5
- Enhance "Create thumbnails --> Render" to force thumbnail (re)creation. 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.