在mediastore在安卓MICRO_KIND和MINI_KIND之间的区别是什么? [英] difference between MICRO_KIND and MINI_KIND in mediastore in android?

查看:2021
本文介绍了在mediastore在安卓MICRO_KIND和MINI_KIND之间的区别是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Andr​​oid文档我没有意思在micro_kind和mini_kind,什么是在这两年有什么区别?

In my android docs i don't have meaning in micro_kind and mini_kind, what is the difference in this two?

当它涉及到显示图像什么两个区别?

When it comes to displaying the Image what the difference in the two?

的后续问题: 什么是MediaStore.Images和MediaStore.Video的差异,还是给图像的输出,路径包括视频路径,怎么会连我用mediastore.images.thumbnail.mini_kind它​​仍然显示的图像也?

FOLLOWUP QUESTION: what is the difference in MediaStore.Images and MediaStore.Video and still give the output of an image, the path contain video path, how come even i use mediastore.images.thumbnail.mini_kind its still displaying image also?

Bitmap bmp = ThumbnailUtils.createVideoThumbnail(videoPath,
                MediaStore.Images.Thumbnails.MINI_KIND);

Bitmap bmp = ThumbnailUtils.createVideoThumbnail(videoPath,
                MediaStore.Video.Thumbnails.MINI_KIND);

推荐答案

所不同的是在缩略图的大小(尺寸)。

The difference is in the size (dimensions) of the thumbnail.

  • MINI_KIND:512×384
  • MICRO_KIND:96×96
  • MINI_KIND: 512 x 384
  • MICRO_KIND: 96 x 96

所以,当涉及到显示,你会发现差异会在尺寸的差异。 MICRO_KIND 较小,的,而 MINI_KIND 相对更大的矩形

So when it comes to displaying, the difference you will observe will be the difference in dimensions. MICRO_KIND is smaller and square, while MINI_KIND is relatively bigger and rectangular.

<一个href="http://developer.android.com/reference/android/provider/MediaStore.Images.Thumbnails.html#MINI_KIND"><$c$c>MediaStore.Images.Thumbnails.MINI_KIND和<一href="http://developer.android.com/reference/android/provider/MediaStore.Video.Thumbnails.html#MINI_KIND"><$c$c>MediaStore.Video.Thumbnails.MINI_KIND都是整数值为 1

因此​​,当您拨打上面的​​方法,你基本上做的是:

So when you call the methods above, what you are basically doing is:

Bitmap bmp = ThumbnailUtils.createVideoThumbnail(videoPath,1);

这是它始终工作的原因。

This is the reason it always works.

只要记住一个约定使用方法:

Just keep in mind as a convention to use:

  • MediaStore.Images.Thumbnails.MINI_KIND 图像缩略图和
  • MediaStore.Video.Thumbnails.MINI_KIND 视频缩略图,
  • MediaStore.Images.Thumbnails.MINI_KIND for image thumbnails and,
  • MediaStore.Video.Thumbnails.MINI_KIND for video thumbnails,

,以便使code一致性和可读性。

so as to make the code consistent and readable.

这篇关于在mediastore在安卓MICRO_KIND和MINI_KIND之间的区别是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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