简体   繁体   English

Android-如何将大位图设置为ImageSpan?

[英]Android - how to set a large bitmap to ImageSpan?

I try to set a large bitmap(720*18463) to ImageSpan , but it didn't appear, and the problem is : 我尝试将较大的bitmap(720*18463)ImageSpan ,但没有出现,问题是:

W/OpenGLRenderer: Bitmap too large to be uploaded into a texture (720x18463, max=4096x4096)

How to deal with it ? 怎么处理呢?

(Addtional, I want to make a RichText Editor, which can add image around text.) (另外,我想制作一个RichText编辑器,它可以在文本周围添加图像。)

解码时缩放位图,如果要控制边界,则用BitmapDrawable包装它。

There is no sense to put 18463 pixels bitmap on a screen, because it's large then any screen existed on market. 在屏幕上放置18463像素位图是没有意义的,因为它太大了,市场上还没有任何屏幕。 You must to scale it down in order to make it works. 您必须按比例缩小比例才能使其正常运行。 In order to scale it down, please check that answer . 为了缩小规模,请检查该答案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM