BinRoot
BinRoot

Reputation: 694

Is there a way to get an Android thumbnail between MICRO_KIND and MINI_KIND?

Generating thumbnails is done using the following method

MediaStore.Images.Thumbnails.getThumbnail(myContentResolver, origId, kind, options);

where the kind field can either be MINI_KIND or MICRO_KIND.

However, MICRO is too small and MINI is too big.

How can I get a thumbnail in between?

Upvotes: 0

Views: 1489

Answers (2)

shem
shem

Reputation: 4712

You can use MINI_KIND with sample size 2:

Options options = new Options();
options.inSampleSize = 2;
result = MediaStore.Images.Thumbnails.getThumbnail(myContentResolver, origId, MediaStore.Images.Thumbnails.MINI_KIND, options);

Upvotes: 1

UpLate
UpLate

Reputation: 1266

Take the bitmap returned from getThumbnail() and supply it to Bitmap.createScaledBitmap().

Upvotes: 0

Related Questions