Hello there,
I'm trying to decode a TIF downloaded from the internet and stored to local File.
No exception.
I tried to step into decodeFile and saw options structure correctly filled (width, height, compression type, ...), but the returned bitmap is null.
I just have the notice about "16KB Alignment": could it be the issue?
Thank you.
// Create a temporary file because most TIFF decoders work better with FileDescriptors or Paths
File tempFile = File.createTempFile("radar_temp", ".tif", main.getApplicationContext().getCacheDir());
FileOutputStream out = new FileOutputStream(tempFile);
byte[] buffer = new byte[1024];
int read;
while ((read = input.read(buffer)) != -1) {
out.write(buffer, 0, read);
}
out.close();
// Use the library to decode
Bitmap myBitmap = TiffBitmapFactory.decodeFile(tempFile);
Hello there,
I'm trying to decode a TIF downloaded from the internet and stored to local File.
No exception.
I tried to step into decodeFile and saw options structure correctly filled (width, height, compression type, ...), but the returned bitmap is null.
I just have the notice about "16KB Alignment": could it be the issue?
Thank you.