react-native
react-native copied to clipboard
[iOS] Change Image load event size info from logical size to pixel
Summary:
Fixes #45188. This fixes old arch. fabric fix may wait until #44918.
Changelog:
[IOS] [BREAKING] - Change Image load event size info from logical size to pixel
Test Plan:
Android/iOS return the same size .
<Image
style={{width: '100%', height: '100%'}}
source={{
uri: 'https://image-placeholder.com/images/actual-size/75x75.png',
}}
resizeMode={'cover'}
onLoad={e => {
console.log(
`RNImage:${Platform.OS} load JPEG image from url`,
e.nativeEvent,
);
}}
/>
| Platform | Engine | Arch | Size (bytes) | Diff |
|---|---|---|---|---|
| android | hermes | arm64-v8a | 20,300,550 | -15 |
| android | hermes | armeabi-v7a | n/a | -- |
| android | hermes | x86 | n/a | -- |
| android | hermes | x86_64 | n/a | -- |
| android | jsc | arm64-v8a | 23,497,351 | -22 |
| android | jsc | armeabi-v7a | n/a | -- |
| android | jsc | x86 | n/a | -- |
| android | jsc | x86_64 | n/a | -- |
Base commit: ad3df84668f1624e830396364c331783c6f99948 Branch: main
Hi @zhongwuzw :) Let's replicate the same process in the new architecture, as it returns the same value as the old one.
@cipolleschi Can you help to review it? :)
@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.
@cipolleschi merged this pull request in facebook/react-native@09995fc8741cfdc6095d09627262b4f6fbbaafc2.
This pull request was successfully merged by @zhongwuzw in 09995fc8741cfdc6095d09627262b4f6fbbaafc2
When will my fix make it into a release? | How to file a pick request?