I am trying to load very high resolution image (15000 x 8438) with glide and saving it as bitmap. I am using glide for that. The problem is that when I try to save bitmap image to file I get black image instead of actual image.
I feel maybe this is because of very high resolution. After converting to bitmap these values I have obtained: width 15000 height: 8438 getAllocationInBytes : 506280000.
I tried to downscale image with .downsample(DownsampleStrategy.AT_MOST) but image is still 15000 x 8438. The code I am using is:
Glide.with(this).asBitmap()
.load(imagePath)
.downsample(DownsampleStrategy.AT_MOST)
.diskCacheStrategy(DiskCacheStrategy.NONE)
.skipMemoryCache(true)
.into(FileTarget(someFile, Bitmap.CompressFormat.JPEG, 90) {}
Can someone please help, how can I down scale the image and save it to the file. Also is it possible to achieve it with glide ?
Thank you.