Question

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?

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);
Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top