加快ImageView的缩放功能 [英] Speed up zoom feature in ImageView

查看:181
本文介绍了加快ImageView的缩放功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在处理,不能调整大小或COM pressed多种原因真正的大图像(7-10mb)。

I'm currently dealing with really big images (7-10mb) that cannot be resized or compressed for multiple reasons.

现在,这个想法是向他们展示一个自定义的ImageView,使用户做双击缩放,捏放大等。

Now, the idea is to show them in a custom ImageView that enables the user to do the double-tap zoom, pinch to zoom, etc.

我用这个库作业: https://github.com/MikeOrtiz/TouchImageView

我也试过其他的库,但所有其他库仍然很慢。有人可以给我一些指点/建议,使其更快(甚至写我自己的C ++ implentation)?

I've tried also other libraries but every other library is still really slow. Can someone give me some pointers/suggestion to make it faster (even writing my own C++ implentation)?

我有点这一切的黑客帝国,flig,规模化的东西失去了,我没有我应该碰一下,使其更快的想法。如果你知道还有其他快库(或如何使用定制的Andr​​oid实现中,作品真的快)将是巨大的。

I'm a bit lost with all this "Matrix", "flig", "scale" thing and I have no idea of what I should touch to make it faster. If you know also other faster libraries (or how to use the custom Android implementation, that works really fast) it would be great.

推荐答案

您是否尝试过使用离子库的DeepZoom功能?

Have you tried using the DeepZoom feature of the Ion library?

https://github.com/koush/ion

https://www.youtube.com/watch?v=yIMltNEAKZY

如果你不想使用OpenGL的,或者上面的库不工作,你也可以尝试用的 http://developer.android.com/reference/android/graphics/Bitma$p$pgionDe$c$cr.html 类。也就是说,防不胜防,其中用户的(视口和缩放级别)和DE code这个区域离主线程,每个用户改变输入时间推入画布。

If you don't want to to use opengl, or the above library does not work, you can also try playing with the http://developer.android.com/reference/android/graphics/BitmapRegionDecoder.html class. That is, keep track of "where" the user is (the viewport & zoom level) and decode that region off the main thread, pushing it into a canvas each time the user changes the input.

这篇关于加快ImageView的缩放功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆