facebookresearch / playtorch

PlayTorch is a framework for rapidly creating mobile AI experiences.
https://playtorch.dev/
MIT License
830 stars 101 forks source link

Introduce new imageFromFile API function signature #186

Closed raedle closed 1 year ago

raedle commented 1 year ago

Summary: Introduce new media API to get an image from a filepath.

Example with RNFS (react-native-fs) to get a valid filepath.

import { media } from 'react-native-pytorch-core';
import * as RNFS from 'react-native-fs';

const image = media.imageFromFile(
  RNFS.DownloadDirectoryPath + '/saved_image.png',
);
// do something with image

Differential Revision: D40747568

vercel[bot] commented 1 year ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
playtorch ✅ Ready (Inspect) Visit Preview Jan 13, 2023 at 6:02AM (UTC)
facebook-github-bot commented 1 year ago

This pull request was exported from Phabricator. Differential Revision: D40747568

facebook-github-bot commented 1 year ago

This pull request has been merged in facebookresearch/playtorch@0f0ed9647ebe787dbca210f5b773f56dd5f3a701.