Shopify / Shopify/react-native-skia
[expo-image] makeImageFromView ignoring Image size and borderRadius styles
Open
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)
Rendered by SKIA
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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