Skip to content

[expo-image] makeImageFromView ignoring Image size and borderRadius styles #3690

@XChikuX

Description

@XChikuX

Description

Re-created from #1995

The fixes(#2001) mentioned in the above thread don't apply to a major package: expo-image

Please address these

React Native Skia Version

latest

React Native Version

0.81.0

Using New Architecture

  • Enabled

Steps to Reproduce

import { Image } from 'expo-image'  // Expo image bug

const makeImage = (ref) => {
        const base64 = (await makeImageFromView(snapRef)).encodeToBase64(4, 100);
        return base64;
}

const Component = () => {
const snapRef= useRef();
  return(
      <View
        ref={snapref}
        style={{
          width: 300,
          height: 300,
          alignItems: 'center',
          justifyContent: 'center',
        }}>
        <Image
          style={{ width: 36, height: 36, borderRadius: 4 }}
          source={{ uri: 'http://via.placeholder.com/640x36' }}
        />
      </View>
  )
}

Example, Screenshots

Rendered by React Native (Expo)
Image

Rendered by SKIA
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions