First, the method returns an IllegalArgumentExceptionException.
Please check if you can catch it with try catch.
Second, it may be caused by the image file being too large. Please experiment with a small image.
© 2024 OneMinuteCode. All rights reserved.