Shopify / Shopify/react-native-skia

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

Open
#3,690 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
8.6k
Forks
647
Avg merge
1d 17h
Merged PRs (30d)
35

Description

Description

Re-created from https://github.com/Shopify/react-native-skia/issues/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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the makeImageFromView entry point and reproduce the example using expo-image with the specified size and borderRadius styles. Compare the captured output with the React Native rendering; done means the generated image respects those styles.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
frontend, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.