Closed 1049884729 closed 7 years ago
Hello. It's because inDirCount and outDirCount works like List.size() or array.lenght() functions. It means that, if you image has outDirCount == 3, you should use inDirCount ==0, 1, 2, but not 3
thank you reply my question,I kown your said,when I read the functions of mark ,mean that " /**
if outDirectoryCount after decoding with or without inJustDecodeBounds is -1, then there is an error decoding image. Try to set inThrowException to true before decoding and if there is some error - library will throw exception.
Also
outDirectoryCount will be set to 0 if {@link #inJustDecodeBounds} is set to false and image decoded successful.
This is wrong. I will change it in nearest release, but if image decoded successful, then in outDirectoryCount option will be number of directory in image file
the log error is " Caused by: org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException: Available memory is not enought to decode image. Available 20000000 bytes. Need 32012288 bytes. at org.beyka.tiffbitmapfactory.TiffBitmapFactory.nativeDecodePath(Native Method) at org.beyka.tiffbitmapfactory.TiffBitmapFactory.decodeFile(TiffBitmapFactory.java:96) "
Did you try other files? maybe you forgot add
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
to your manifest file?
ah,yes, I forgot add the permission。and now the log error is “Caused by: org.beyka.tiffbitmapfactory.exceptions.NotEnoughtMemoryException: Available memory is not enought to decode image. Available 20000000 bytes. Need 32012288 bytes. at org.beyka.tiffbitmapfactory.TiffBitmapFactory.nativeDecodePath(Native Method) at org.beyka.tiffbitmapfactory.TiffBitmapFactory.decodeFile(TiffBitmapFactory.java:96)” thanks very much
@Beyka Thank you very much ! I have resolve my question
NotEnoughtMemoryException For decoding you can use almost all memory of device. And yeah, 20Mb is to less to decode big images. Default value for this field is 244Mb
I hava a question when I used the "int dirCount = options.outDirectoryCount;"but this dirCount is -1,please help me !thank you very much!