difference between MICRO_KIND and MINI_KIND in mediastore in android?

前端 未结 1 1647
北荒
北荒 2021-02-08 03:25

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 th

1条回答
  •  我在风中等你
    2021-02-08 04:07

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

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

    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.

    MediaStore.Images.Thumbnails.MINI_KIND and MediaStore.Video.Thumbnails.MINI_KIND are both integers with value 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 for image thumbnails and,
    • MediaStore.Video.Thumbnails.MINI_KIND for video thumbnails,

    so as to make the code consistent and readable.

    0 讨论(0)
提交回复
热议问题