Comments (7)
That's implementation detail of SSIV, briefly speaking:
It does a downsampling when load the image fully into screen (as a Bitmap, so it's in java heap), that downsampling is optional too, if the image is very small, no downsampling happens, then when user zoom the image, only several regions of the image is decoded (also as Bitmap, java heap).
For more detail, you can refer to https://github.com/davemorrissey/subsampling-scale-image-view .
from bigimageviewer.
I see. Can you also add the JNI solution?
I think it should be better in terms of performance and maybe even heap memory usage.
You could even downsample in your own way. As I remember, the downsampling of Android is only of power of 2, and it sometimes has some aliasing in it.
In the past, I created a library that shows how to mess around with bitmaps, but sadly it doesn't do the decoding in JNI: https://github.com/AndroidDeveloperLB/AndroidJniBitmapOperations
However, I remember I saw a library that does the decoding in JNI too, yet it wasn't seem to be easy to use.
from bigimageviewer.
Image loading and cacheing, that's the responsibility of image loading library, e.g. Fresco, Glide, Picasso, and image displaying, including downsampling, pan and zoom, animation, etc, is the responsibility of image displaying library, e.g. SSIV.
This library focus on bridging them together, although currently only image loading library is configurable, but if there are other brilliant image displaying libraries, make it configurable is very easy.
from bigimageviewer.
I'm not complaining. I just suggest this as another option, because I think a single decoding (even if it's a bit long) might be better than multiple ones, as long as your device has enough RAM.
If you take, for example, a 40MP image, it takes around 40*4 = 160MB of RAM. This is a lot for heap memory, but it's fine for RAM itself, because most devices out there have at least 1GB of RAM.
from bigimageviewer.
Yep, I understand. But I really think that's another image displaying library. Besides, I don't have enough knowledge and time to do such thing, currently.
If you have a good solution, I can modify this library to use your image viewer as an option :)
from bigimageviewer.
Sadly the more I read about it, the more complex I saw of how to decode images in JNI.
from bigimageviewer.
I'm going to close this issue, if you have other questions, please feel free to reopen it :)
from bigimageviewer.
Related Issues (20)
- Forbidden 403 HOT 1
- ProgressPieIndicator still requires com.android.support HOT 1
- piasy/RxQrCode/1.3.0/RxQrCode-1.3.0.pom 无法下载 HOT 1
- Why cannot download 1.2.9 ? HOT 1
- saveImageIntoGallery not working on Android 11 HOT 3
- Set Small image Zoomable HOT 2
- Some important zoom feature didn't find yet HOT 1
- Error inflating class com.github.piasy.biv.view.BigImageView HOT 1
- Choose MIME type for saving image? HOT 5
- Can not load Bitmap HOT 1
- 小图可以设置充满屏幕宽度吗。现在是自适应大小,所以显着很小 HOT 3
- How to quit zoom mode? HOT 1
- Failed to resolve: com.github.piasy:GlideImageLoader HOT 1
- 关于使用代理加载图片的问题 HOT 1
- 使用体验
- 请问可以获取BigImageView的bitmap吗? HOT 1
- 请问支持图片的旋转吗 HOT 1
- Scaling GIF images HOT 1
- 加水印 HOT 1
- Clear (previously) loaded image from BigImageView in RecyclerView's view holder 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 bigimageviewer.