Skip to content

unsupported image format file #367

@xlyasdasd

Description

@xlyasdasd

Hi,I got these log when crop a PNG Image.
�I can see the image in the UCropActivity successful.So that the uri I passed should be right.

I/BitmapCropTask: Should crop: true
I/ExifInterface_JNI: Raw image not detected
W/ExifInterface: Invalid image: ExifInterface got an unsupported image format file(ExifInterface supports JPEG and some RAW image formats only) or a corrupted JPEG file to ExifInterface.
                                                                 java.io.IOException: Invalid marker: 89
                                                                     at android.media.ExifInterface.getJpegAttributes(ExifInterface.java:1830)
                                                                     at android.media.ExifInterface.loadAttributes(ExifInterface.java:1474)
                                                                     at android.media.ExifInterface.<init>(ExifInterface.java:1111)
                                                                     at com.yalantis.ucrop.task.BitmapCropTask.crop(BitmapCropTask.java:151)
                                                                     at com.yalantis.ucrop.task.BitmapCropTask.doInBackground(BitmapCropTask.java:95)
                                                                     at com.yalantis.ucrop.task.BitmapCropTask.doInBackground(BitmapCropTask.java:35)
                                                                     at android.os.AsyncTask$2.call(AsyncTask.java:304)
                                                                     at java.util.concurrent.FutureTask.run(FutureTask.java:237)
                                                                     at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)
                                                                     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
                                                                     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
                                                                     at java.lang.Thread.run(Thread.java:761)

usage:

  String destinationFileName = "cacheImage.png";

        UCrop uCrop = UCrop.of(uri, Uri.fromFile(new File(Environment.getExternalStorageDirectory() + "/" + path, destinationFileName)));
         uCrop = uCrop.useSourceImageAspectRatio();
        uCrop = uCrop.withMaxResultSize(500, 500);
        uCrop.start(mActivity);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions