适合大的图像分成小的ImageView以良好的质量与原始图像? [英] Fit the large image into small imageview with as good quality as the original image?
问题描述
您好,我在一个很好的Android应用程序的工作,我需要适应大位图到小尺寸的ImageView
。我使用的ImageView
尺寸的 300dp X 300dp 的,以显示大图的 1024×780 的
Hello I am working on one good android app where I need to fit the large bitmap into small size imageview
. I am using imageview
of size 300dp X 300dp to display large image 1024 X 780
如何使大图像分成小,良好的质量与原始图像?
How can I make the large image into small with as good quality as the original image ?
推荐答案
@Nikola评论回答了我的问题。我写这个的答案,所以,这将有利于未来的读者
@Nikola comment answered to my question. I am writing this in the answer so that it would good for future readers
您应该使大小为300x300的缩略图,但preserving长宽比。您可以集中一些颜色填充空间的其余部分在画布上绘制较大的图像。
You should make a Thumbnail image of size 300x300 but preserving its aspect ratio. You can draw larger images on a canvas centered with some color filling the rest of the space.
这篇关于适合大的图像分成小的ImageView以良好的质量与原始图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!