diff --git a/android_jni/avifandroidjni/src/main/java/org/aomedia/avif/android/AvifDecoder.java b/android_jni/avifandroidjni/src/main/java/org/aomedia/avif/android/AvifDecoder.java index 93301156db..fe4805fe39 100644 --- a/android_jni/avifandroidjni/src/main/java/org/aomedia/avif/android/AvifDecoder.java +++ b/android_jni/avifandroidjni/src/main/java/org/aomedia/avif/android/AvifDecoder.java @@ -94,9 +94,9 @@ public static boolean isAvifImage(ByteBuffer buffer) { * @param length Length of the encoded buffer. * @param bitmap The decoded pixels will be copied into the bitmap. * If the bitmap dimensions do not match the decoded image's dimensions, - * then the decoded image will bescaledto match the bitmap's dimensions. + * then the decoded image will be scaled to match the bitmap's dimensions. * @return true on success and false on failure. A few possible reasons for failure are: 1) Input - * was not valid AVIF. 2) Bitmap was not large enough to store the decoded image. + * was not valid AVIF. */ public static boolean decode(ByteBuffer encoded, int length, Bitmap bitmap) { return decode(encoded, length, bitmap, 0, false); @@ -108,6 +108,8 @@ public static boolean decode(ByteBuffer encoded, int length, Bitmap bitmap) { * @param encoded The encoded AVIF image. encoded.position() must be 0. * @param length Length of the encoded buffer. * @param bitmap The decoded pixels will be copied into the bitmap. + * If the bitmap dimensions do not match the decoded image's dimensions, + * then the decoded image will be scaled to match the bitmap's dimensions. * @param threads Number of threads to be used for the AVIF decode. Zero means use number of CPU * cores as the thread count. Negative values are invalid. When this value is > 0, it is * simply mapped to the maxThreads parameter in libavif. For more details, see the @@ -115,8 +117,7 @@ public static boolean decode(ByteBuffer encoded, int length, Bitmap bitmap) { * @param isScale Is enable image scale in decoding. If true the encoded AVIF image size while be * decode with size of bitmap. * @return true on success and false on failure. A few possible reasons for failure are: 1) Input - * was not valid AVIF. 2) Bitmap was not large enough to store the decoded image. 3) Negative - * value was passed for the threads parameter. + * was not valid AVIF. 2) Negative value was passed for the threads parameter. */ public static native boolean decode(ByteBuffer encoded, int length, Bitmap bitmap, int threads, boolean isScale);