react-native-image-resizer icon indicating copy to clipboard operation
react-native-image-resizer copied to clipboard

Isn't `rotatedImage != rotatedImage` always true?

Open retyui opened this issue 1 year ago • 4 comments

Describe the bug

Hi bam engineers. can you explain how the next line should works

https://github.com/bamlab/react-native-image-resizer/blob/96721a2c346c3254e28bf48e81cd4ed7815d24e3/android/src/main/java/com/reactnativeimageresizer/ImageResizer.java#L560-L562

retyui avatar Feb 03 '24 20:02 retyui

As an optimisation, it could be possible for rotateImage() to return the same Bitmap when rotation=0.

macksal avatar Feb 12 '24 23:02 macksal

Should it be rotatedImage != sourceImage?

0xc22b avatar Mar 27 '24 06:03 0xc22b

ha, you're right. I wonder if there's a memory leak because of this? Not sure if Bitmap.recycle is necessary to call or if it can still be GC'd

macksal avatar Apr 12 '24 09:04 macksal

Hey ! Indeed I think it's not normal. Will be fixed in this PR once merged : #398

gh-clement-taboulot avatar Apr 24 '24 12:04 gh-clement-taboulot

@retyui

I close this issue has it must be fixed in 3.0.10.

gh-clement-taboulot avatar May 30 '24 10:05 gh-clement-taboulot

thx

retyui avatar May 30 '24 11:05 retyui