Skip to content

[RNE Rewrite] Use skImageToBuffer helper across computer-vision demo screens #1304

Description

@msluszniak

Summary

Use the shared skImageToBuffer helper across the computer-vision demo screens instead of the inline readPixels() → buffer boilerplate. Demo-app cleanup only; no library change.

Context

#1292 added skImageToBuffer (apps/computer-vision/utils.ts) and the new image-embeddings screen uses it. The remaining CV demo screens still hand-roll the same conversion. Raised by @barhanc in review of #1292; kept out of that PR to keep it scoped to embeddings.

Scope

Replace the inline pixel-read block with skImageToBuffer(skiaImage) in:

  • apps/computer-vision/app/classification/index.tsx
  • apps/computer-vision/app/detection/index.tsx
  • apps/computer-vision/app/segmentation/index.tsx
  • apps/computer-vision/app/instanceSegmentation/index.tsx
  • apps/computer-vision/app/keypoint/index.tsx
  • apps/computer-vision/app/styleTransfer/index.tsx

Mechanical and behavior-preserving — only the readPixels()/buffer construction changes.

Out of scope

  • Do not touch the useSafeAreaInsets / insets.bottom padding — all screens use it consistently and it should stay.
  • Demo apps only; the react-native-executorch package is unaffected.

Context / follows

Metadata

Metadata

Assignees

Type

Fields

No fields configured for Task.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions