You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
setImageSrc(String) keeps the cropped image of the previous source #38
After changing the image with setImageSrc(String), getCroppedImageDataUri() (and getCroppedImageBase64()) still return the value from the previous image until the user crops the new one.
Expected behavior
Changing the image source should reset the cropped image, consistently with the constructor: ImageCrop(String) initializes it to the image source itself.
Related, also pre-existing (found by @javier-godoy while reviewing #37): the String constructor stores the image URL in croppedImageDataUri, so new ImageCrop("images/empty-plant.png").getCroppedImageBase64() tries to Base64-decode a URL and throws IllegalArgumentException. ImageCrop(DownloadHandler) returns null in the same situation, so the two constructors disagree.
Activity
paodb commentedon Oct 14, 2026
Related, also pre-existing (found by @javier-godoy while reviewing #37): the String constructor stores the image URL in
croppedImageDataUri, sonew ImageCrop("images/empty-plant.png").getCroppedImageBase64()tries to Base64-decode a URL and throwsIllegalArgumentException.ImageCrop(DownloadHandler)returnsnullin the same situation, so the two constructors disagree.fix!: reset cropped image when the image source changes
fix!: reset cropped image when the image source changes