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

[iOS] Change Image load event size info from logical size to pixel

Open zhongwuzw opened this issue 1 year ago • 2 comments

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,
        );
      }}
    />

zhongwuzw avatar Jun 27 '24 07:06 zhongwuzw

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

analysis-bot avatar Jun 27 '24 08:06 analysis-bot

Hi @zhongwuzw :) Let's replicate the same process in the new architecture, as it returns the same value as the old one.

bohdanprog avatar Jun 28 '24 16:06 bohdanprog

@cipolleschi Can you help to review it? :)

zhongwuzw avatar Dec 31 '24 05:12 zhongwuzw

@cipolleschi has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

facebook-github-bot avatar Dec 31 '24 10:12 facebook-github-bot

@cipolleschi merged this pull request in facebook/react-native@09995fc8741cfdc6095d09627262b4f6fbbaafc2.

facebook-github-bot avatar Dec 31 '24 17:12 facebook-github-bot

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?

react-native-bot avatar Dec 31 '24 17:12 react-native-bot