penfeizhou / APNG4Android

Android animation support for APNG & Animated WebP & Gif & Animated AVIF, High performance
Apache License 2.0
570 stars 75 forks source link

[bug] onRender:Buffer not large enough for pixels #212

Closed tudou0digua closed 6 months ago

tudou0digua commented 6 months ago

New Issue Checklist

Issue Info

Info Value
Device Info e.g. 小米Mix 2s (android 10) / 荣耀magic5 (Android14)
System Version e.g. 10.0/14.0
APNG4Android Library Version e.g. 2.28.0
Repro rate e.g. all the time (100%)
Repro with our demo project it happen with our demo project
Demo project link e.g. link to a demo project that highlights the issue

Issue Description and Steps

Please fill in the detailed description of the issue (full output of any stack trace, compiler error, ...) and the steps to reproduce the issue. 1、ImageView 宽高比较小,apng图片宽高比imageView 大一点时 2、ImageView scaleType set fitXY 3、Glide 加载图失败,必现报错:onRender:Buffer not large enough for pixels (FrameAnimationDrawable -> onRender() 方法中报错)

复现代码: 1、图片 url:https://code.z01.com/elephant.png 2、glide 版本:4.13.2 3、代码:(修改:APNGTestActivity 中的代码) ImageView imageView = new ImageView(this); LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(44 2, 44 2); layoutParams.bottomMargin = 50; layoutParams.topMargin = 50; imageView.setScaleType(ImageView.ScaleType.FIT_XY); linearLayout.addView(imageView, layoutParams); Glide.with(imageView) .load("https://code.z01.com/elephant.png") .into(imageView);

penfeizhou commented 6 months ago

感谢反馈, 该问题已在v2.29.0 修复