zjupure / glidewebpdecoder Goto Github PK
View Code? Open in Web Editor NEWA Glide WebpDecoder Intergration Library for decoding and displaying webp images
License: Apache License 2.0
A Glide WebpDecoder Intergration Library for decoding and displaying webp images
License: Apache License 2.0
When applying transformations to some animated WebP images, the result animation looks broken.
For example, with the following code:
Glide.with(this)
.load("https://mathiasbynens.be/demo/animated-webp-supported.webp")
.apply(new RequestOptions().optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(new CircleCrop())))
.into(imageView);
// Dependencies
def GLIDE_VERSION = "4.7.1"
implementation "com.zlc.glide:webpdecoder:0.0.8.${GLIDE_VERSION}"
implementation "com.github.bumptech.glide:glide:${GLIDE_VERSION}"
annotationProcessor "com.github.bumptech.glide:compiler:${GLIDE_VERSION}"
The result looks like this:
Without applying transformations, the images are ok and the animation looks perfect.
This isn't available anymore when using the instructions on the repository:
Transformation<Bitmap> circleCrop = new CircleCrop();
GlideApp.with(mContext)
.load(url)
.optionalTransform(circleCrop)
.optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(circleCrop))
.into(imageView);
Instead of "GlideApp", we have just "Glide", and there is no "optionalTransform". Instead we have "apply".
It even says so on the links of the repository:
https://github.com/wasabeef/glide-transformations
https://bumptech.github.io/glide/doc/transformations.html
Attached sample POC that follows the instructions, but if you use the code in the instructions, it will fail to build.
Hi ... I would like to know how I can use this decoder when I don't want to apply any kind of transformation (or use the default one).
Thanks in advance
在demo上可以加在网络webp动图,但在我们公司项目上加载不了(只能加载常规webp图片),好神奇,报错日志如下。
06-28 16:51:02.142 2591-2827/com.hdwawa.claw E/GlideExecutor: Request threw uncaught throwable
java.lang.IllegalArgumentException: Unable to convert com.bumptech.glide.integration.webp.decoder.WebpDrawable@4e4c26c to a Bitmap
at com.bumptech.glide.load.resource.bitmap.DrawableTransformation.transform(DrawableTransformation.java:56)
at com.bumptech.glide.load.engine.DecodeJob.onResourceDecoded(DecodeJob.java:534)
at com.bumptech.glide.load.engine.DecodeJob$DecodeCallback.onResourceDecoded(DecodeJob.java:598)
at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:46)
at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:58)
at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:43)
at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:501)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:472)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:458)
at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:410)
at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:379)
at com.bumptech.glide.load.engine.SourceGenerator.onDataFetcherReady(SourceGenerator.java:135)
at com.bumptech.glide.load.engine.DataCacheGenerator.onDataReady(DataCacheGenerator.java:95)
at com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:74)
at com.bumptech.glide.load.engine.DataCacheGenerator.startNext(DataCacheGenerator.java:75)
at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:49)
at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:302)
at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:272)
at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:233)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at java.lang.Thread.run(Thread.java:764)
at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
03-28 21:27:13.863 21015-21015/com.bunz.dev I/Glide: Root cause (1 of 1) java.lang.NoSuchMethodError: No direct method <init>(I)V in class Lcom/bumptech/glide/util/LruCache; or its super classes (declaration of 'com.bumptech.glide.util.LruCache' appears in /data/app/com.sample-2/split_lib_directories_apk.apk) at com.bumptech.glide.integration.webp.decoder.WebpDecoder.<init>(WebpDecoder.java:72) at com.bumptech.glide.integration.webp.decoder.ByteBufferWebpDecoder.decode(ByteBufferWebpDecoder.java:73) at com.bumptech.glide.integration.webp.decoder.ByteBufferWebpDecoder.decode(ByteBufferWebpDecoder.java:30) at com.bumptech.glide.integration.webp.decoder.StreamWebpDecoder.decode(StreamWebpDecoder.java:61) at com.bumptech.glide.integration.webp.decoder.StreamWebpDecoder.decode(StreamWebpDecoder.java:24) at com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:72) at com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:55) at com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:45) at com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:58) at com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:43) at com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:498) at com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:469) at com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:455) at com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:407) at com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:376) at com.bumptech.glide.load.engine.SourceGenerator.onDataReady(SourceGenerator.java:112) at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.onDataReady(MultiModelLoader.java:133) at com.bumptech.glide.load.data.LocalUriFetcher.loadData(LocalUriFetcher.java:52) at com.bumptech.glide.load.model.MultiModelLoader$MultiFetcher.loadData(MultiModelLoader.java:97) at com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:62) at com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:299) at com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:269) at com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:230) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) at java.lang.Thread.run(Thread.java:761) at com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:446)
Possibly because of using older version of Glide?
can i use this lib in iOS,is makefile.am is good to used ?
Suppose I play a GIF/WEBP animation, and now I change the orientation.
I don't want the animation to start from the beginning.
I know it's possible to get which is the current frame index, but how can I skip to a specific frame ?
Hello developers:
On Android 9.0 I found some exception information when app started, the stack is as follows:
03-15 16:18:13.307 26854-26854/com.xxx.xxx:dcs W/SoLoader: Cannot get nativeLoad method
java.lang.NoSuchMethodException: nativeLoad [class java.lang.String, class java.lang.ClassLoader, class java.lang.String]
at java.lang.Class.getMethod(Class.java:2068)
at java.lang.Class.getDeclaredMethod(Class.java:2047)
at com.facebook.soloader.SoLoader.getNativeLoadRuntimeMethod(SoLoader.java:281)
at com.facebook.soloader.SoLoader.initSoLoader(SoLoader.java:233)
at com.facebook.soloader.SoLoader.initImpl(SoLoader.java:141)
at com.facebook.soloader.SoLoader.init(SoLoader.java:120)
at com.facebook.soloader.SoLoader.init(SoLoader.java:104)
at com.xxx.xxx.impl.webp.WebpResourceDecoder.<init>(WebpResourceDecoder.java:54)
at com.xxx.xxx.base.xxx.registerComponents(xxx.java:77)
at com.bumptech.glide.GeneratedAppGlideModuleImpl.registerComponents(GeneratedAppGlideModuleImpl.java:32)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:269)
at com.bumptech.glide.Glide.initializeGlide(Glide.java:219)
at com.bumptech.glide.Glide.checkAndInitializeGlide(Glide.java:180)
at com.bumptech.glide.Glide.get(Glide.java:164)
...
You may be confused that some classes( For example, WebpResourceDecoder) are not in your project.
In fact, our project integrates your project and GlideWebpSupport (https://github.com/roths/GlideWebpSupport) in a sourcecode-dependent way. We replaced the WebpDecoder and WebpFrameLoader classes in your project with the same-named classes in the GlideWebpSupport project (because we found some problems with the GlideWebpSupport project).
My question is what would be the risk of this error if not handled, because we have not found any abnormality in the loading of dynamic webp.
Due to the lack of familiarity with fresco and c++ mechanisms, I would like to ask if it is necessary to deal with this error, because we only use fresco to load dynamic webp.
Many thanks.
libwebp update to 1.0.1
Is it possible to do a manual decoding? To skip between frames?
使用场景:Tabhost+Fragment+RecyclerView(Grid)
切换界面,通过view.setVisibilityChangeListener监听View的显示状态,通过WebpDrawable来控制动画播放,来回滑动列表几次很容易出现这个崩溃。
日志如下:
java.lang.NullPointerException: Attempt to invoke virtual method 'int com.bumptech.glide.integration.webp.WebpImage.getFrameCount()' on a null object reference
at com.bumptech.glide.integration.webp.decoder.WebpDecoder.getFrameCount(WebpDecoder.java:120)
at com.bumptech.glide.integration.webp.decoder.WebpFrameLoader.getFrameCount(WebpFrameLoader.java:136)
at com.bumptech.glide.integration.webp.decoder.WebpDrawable.startRunning(WebpDrawable.java:154)
at com.bumptech.glide.integration.webp.decoder.WebpDrawable.start(WebpDrawable.java:142)
另外,CPU占用挺高的,不知道能否优化。
我按照文档上面的方法集成了,但是还是没法显示动图,只能显示静态的,请问集成之后需要做什么代码改动么?
I have a list of webp images in recycler view.
Each of webp image is displayed fine, the scrolling is very smooth. There is only 1 problem.
When I stop a webp drawable, then scroll the list, the stopped webp drawable get distorted and sometimes it displays other webp drawable in the list.
The code that I use to stop/start the webp.
Drawable drawable = mIvGif.getDrawable();
if (drawable instanceof Animatable) {
Animatable animation = (Animatable) drawable;
if (animation.isRunning()) {
animation.stop();
} else {
animation.start();
}
}
Why you set attribute allowBackup with value "flase" in library?
I think allowBackup attribute shuld only be used in App, not in library.
else, if you have another library set the attribute with value "ture", when you clean by gradle, gradle will say error like this.
Error:Execution failed for task ':lib:processDebugAndroidTestManifest'.
> Manifest merger failed : Attribute application@allowBackup value=(true) from [cn.xxx.android.framework:core:12.32] AndroidManifest.xml:69:9-35
is also present at [com.zlc.glide:webpdecoder:0.0.3] AndroidManifest.xml:9:18-45 value=(false).
Suggestion: add 'tools:replace="android:allowBackup"' to <application> element at manifestMerger1393219201869525967.xml:7:g5-9:19 to override.
So, can you remove the attribute allowBackup? Then update release version, thank you.
It's not a fatal error, but it's boring when you clean.
<application android:allowBackup="false"/>
Just delete above line. Thank you very much.
this is code:
File file = Glide.with(activity).asFile().load(url).submit().get();
Bitmap bitmap = WebpBitmapFactory.decodeFile(file.getAbsolutePath());
or
Bitmap bitmap = Glide.with(context).asBitmap().load(url).submit().get();
I tried two methods get bitmap,but always is null;
this is webp url:
http://osscdn.ixingtu.com/musi_file/20181108/a20540641eb7de9a8bf186261a8ccf57.webp
please help me!
The gradle plugin doesn't need it anymore.
Or is it too demanding on today's devices, requiring too much CPU ?
Is it even open sourced and allowed to have a decoder to stay on Apache license?
Would you consider adding it?
Here's a sample:
http://nokiatech.github.io/heif/content/image_sequences/starfield_animation.heic
Found from :
http://nokiatech.github.io/heif/examples.html
Makefile.am:4: error: WANT_MUX does not appear in AM_CONDITIONAL
Makefile.am:7: error: WANT_DEMUX does not appear in AM_CONDITIONAL
Makefile.am:13: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
Makefile.am:43: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
Makefile.am:11: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am:11: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am:11: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am:11: If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am:11: its definition is in aclocal's search path.
Makefile.am:41: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
dec/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
dec/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
dec/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
dec/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
dec/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
dec/Makefile.am:2: its definition is in aclocal's search path.
demux/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
demux/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
demux/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
demux/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
demux/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
demux/Makefile.am:2: its definition is in aclocal's search path.
demux/Makefile.am:18: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
dsp/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
dsp/Makefile.am:14: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
dsp/Makefile.am:153: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
dsp/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
dsp/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
dsp/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
dsp/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
dsp/Makefile.am:2: its definition is in aclocal's search path.
enc/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
enc/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
enc/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
enc/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
enc/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
enc/Makefile.am:2: its definition is in aclocal's search path.
mux/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
mux/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
mux/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
mux/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
mux/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
mux/Makefile.am:2: its definition is in aclocal's search path.
mux/Makefile.am:22: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
utils/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
utils/Makefile.am:4: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
utils/Makefile.am:49: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
utils/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
utils/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
utils/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
utils/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
utils/Makefile.am:2: its definition is in aclocal's search path.
glide 4.8.0优化了gif文件夹里的类,作者是否同步优化webpxx类
I wanted to use this library as a way to pass a Bitmap that was drawn to, frame by frame.
For this, I had to have a workaround that draws the Drawable (GifDrawable or WebpDrawable) into a Bitmap , and then decide what to do with it.
It works very well, but if I let the device sleep for a while (about 20 seconds or so), and return to it, it fails to resume the animation. If I turn off the screen and turn it on again after a short time, it works fine, though.
Any idea why?
Attached sample project to show the issue.
Also attached video to show issue.
Tested on Pixel 2 with Android P.
播放动态webp的时候native内存占用一直在增加,可以被GC掉。1.5.4.8.0版本。
not support glide 4.11.0
Failed to resolve: com.zlc.glide:webpdecoder:1.6.4.11.0
项目里面有另外一个模块,使用的是giflib,这样使用Glide加载GIF图也可以提升效率,所以为什么不使用这个呢?跟webpdecoder这个模块有做什么对比吗?求告知~
2 android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4521)
3 ......
4 Caused by:
5 java.lang.IllegalArgumentException:Cannot change the visibility of a recycled resource. Ensure that you unset the Drawable from your View before changing the View's visibility.
6 com.bumptech.glide.util.Preconditions.checkArgument(Preconditions.java:19)
7 com.bumptech.glide.integration.webp.decoder.WebpDrawable.setVisible(WebpDrawable.java:182)
8 android.widget.ImageView.onVisibilityAggregated(ImageView.java:1594)
9 android.view.View.dispatchDetachedFromWindow(View.java:18422)
10 android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3771)
11 android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3771)
12 android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3771)
13 android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3771)
14 android.view.ViewGroup.removeViewInternal(ViewGroup.java:5363)
15 android.view.ViewGroup.removeViewInternal(ViewGroup.java:5334)
16 android.view.ViewGroup.removeView(ViewGroup.java:5265)
17 android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1550)
18 android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
19 android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
20 android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
21 android.support.v4.app.FragmentManagerImpl.dispatchDestroyView(FragmentManager.java:3254)
22 android.support.v4.app.Fragment.performDestroyView(Fragment.java:2674)
23 android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1533)
24 android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
25 android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
26 android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
27 android.support.v4.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:3260)
28 android.support.v4.app.FragmentController.dispatchDestroy(FragmentController.java:274)
29 android.support.v4.app.FragmentActivity.onDestroy(FragmentActivity.java:419)
30 android.support.v7.app.AppCompatActivity.onDestroy(AppCompatActivity.java:210)
glidewebpdecoder is google webp1`s extends?
Can you please show how to use the decoder to view GIF/WEBP animation in live wallpaper, including how to scale there using popular scaling types (fit-center, center-crop,center-inside) ?
Something similar to what they did here:
https://github.com/koral--/android-gif-drawable
But this time with webp support too.
动态webp透明部分播放出来变成白色了,用fresco没有问题,请问可以解决吗
I need to get loop count from WebpDrawable.
I just want handle setLoopCount when loop count is too large value or infinite.
But WebpDrawable doesn't have getLoopCount().
Is it available?
是否有播放次数和播放完成的监听回调啊?求大神指点
is there have a way to controll animator play fixed time?
webp地址:https://raw.githubusercontent.com/1290846731/RecordMySelf/master/chect.webp
设置背景 webp区域闪烁
我想要同时使用圆角和CropCenter,没效果,demo只使用了一个,请问现在的版本能否支持使用多个Transform?
And how do you keep them updated?
Which version of each is used now?
Hello, I am getting the following error when trying to implement this library :/ .. Can you please guide me on how to fix it? Thanks in advance.
e: Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: [FitCenter, CenterCrop, CircleCrop]
Makefile.am:4: error: WANT_MUX does not appear in AM_CONDITIONAL
Makefile.am:7: error: WANT_DEMUX does not appear in AM_CONDITIONAL
Makefile.am:13: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
Makefile.am:43: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
Makefile.am:11: error: Libtool library used but 'LIBTOOL' is undefined
Makefile.am:11: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
Makefile.am:11: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
Makefile.am:11: If 'LT_INIT' is in 'configure.ac', make sure
Makefile.am:11: its definition is in aclocal's search path.
Makefile.am:41: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
dec/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
dec/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
dec/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
dec/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
dec/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
dec/Makefile.am:2: its definition is in aclocal's search path.
demux/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
demux/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
demux/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
demux/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
demux/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
demux/Makefile.am:2: its definition is in aclocal's search path.
demux/Makefile.am:18: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
dsp/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
dsp/Makefile.am:14: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
dsp/Makefile.am:153: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
dsp/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
dsp/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
dsp/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
dsp/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
dsp/Makefile.am:2: its definition is in aclocal's search path.
enc/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
enc/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
enc/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
enc/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
enc/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
enc/Makefile.am:2: its definition is in aclocal's search path.
mux/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
mux/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
mux/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
mux/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
mux/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
mux/Makefile.am:2: its definition is in aclocal's search path.
mux/Makefile.am:22: error: 'pkgconfig_DATA' is used but 'pkgconfigdir' is undefined
utils/Makefile.am:1: error: AM_CPPFLAGS must be set with '=' before using '+='
utils/Makefile.am:4: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
utils/Makefile.am:49: error: BUILD_LIBWEBPDECODER does not appear in AM_CONDITIONAL
utils/Makefile.am:2: error: Libtool library used but 'LIBTOOL' is undefined
utils/Makefile.am:2: The usual way to define 'LIBTOOL' is to add 'LT_INIT'
utils/Makefile.am:2: to 'configure.ac' and run 'aclocal' and 'autoconf' again.
utils/Makefile.am:2: If 'LT_INIT' is in 'configure.ac', make sure
utils/Makefile.am:2: its definition is in aclocal's search path.
device : Pixel 2 / android 9
Just use FitCenter / CircleCrop
Transformation fitCenter = new FitCenter();
request.optionalTransform(fitCenter)
.optionalTransform(WebpDrawable.class, new WebpDrawableTransformation(fitCenter));
I've noticed that compared to another solution I got (here) for showing Gif animation, this one takes a bit more CPU yet also less RAM .
I've tested on this GIF:
example2.zip
I got a similar comparison results with the new ImageDecoder API of Android P.
Does this mean that using this cool Glide library, it doesn't cache the results, and does the decoding over and over, no matter how much free RAM there is?
If so, is there a way to change this behavior? Maybe let it cache up to certain amount of RAM of my choice?
If it does have caching, how can I enhance it?
Or maybe Glide caches the content of the GIF/WEBP, and then the rest is on the CPU ?
Glide.with(holder.getContext()).load(data.getCover_gif())
.optionalTransform(WebpDrawable.class,new WebpDrawableTransformation(new MultiTransformation<>(new CenterCrop(),roundedCorners)))
.into(iv);
在recyclerview里用,100% oom
播放 animated webp 在三星 Galaxy J3 pro (手机并不差)上帧率明显下降,本来一秒30帧的 webp, we用 chrome 播放很自然,播放起来感觉只有 10 帧
The repository webpage only shows the dependencies. But what about how to use it?
WebpFrameCacheStrategy has three strategy contains NONE, AUTO, ALL. but the code limit the min cache size to five.
At 76 line in WebpDecoder:
int maxCacheSize = MAX_FRAME_BITMAP_CACHE_SIZE;
if (mCacheStrategy.cacheAll()) {
maxCacheSize = webPImage.getFrameCount();
} else {
maxCacheSize = Math.max(maxCacheSize, mCacheStrategy.getCacheSize());
}
In line 209, it is necessary to add the judgment of the flag "isRunning". Since the message of the handler is delayed, the delaytarget still holds a reference to the Bitmap. If there is a view that uses the same Bitmap at this time, it will cause drawing problems such as overlapping images.
0.0.3 is normal,upgrade to 0.0.4,the image do not show and animate.
They say here that Glide performs best on 3.7.0 version of Glide:
And that the newest ones are very bad on it.
GlideApp.with(this)
.load("http://hbpic-10057247.file.myqcloud.com/emoji/shanmeng/0c31ffcaf7ad7ece0d7c7b1e999f76a9.webp")
.centerCrop()
.into(mImageView);
java.lang.IllegalArgumentException(Unable to convert com.bumptech.glide.integration.webp.decoder.WebpDrawable@9240340 to a Bitmap)
call GlideException#logRootCauses(String) for more detail
Cause (1 of 1): class java.lang.IllegalArgumentException: Unable to convert com.bumptech.glide.integration.webp.decoder.WebpDrawable@9240340 to a Bitmap
WebpDecoder
/** @Override Added in Glide 4.4.0 */
public void setDefaultBitmapConfig(Bitmap.Config config) {
if (config != Bitmap.Config.ARGB_8888) {
throw new IllegalArgumentException("Unsupported format: " + config
+ ", must be one of " + Bitmap.Config.ARGB_8888);
}
mBitmapConfig = config;
}
Our project need upgrade androidx. Glide 4.10.0 support androidx feature.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.