New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-native-png-encoder

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-png-encoder

png encoder

latest
Source
npmnpm
Version
0.3.0
Version published
Weekly downloads
0
Maintainers
0
Weekly downloads
 
Created
Source

react-native-png-encoder

A simple React Native library for encoding RGB buffers into PNG files.

Installation

npm install react-native-png-encoder

yarn add react-native-png-encoder

Usage

Save an RGB buffer to an PNG file.

Saves an RGB buffer (array of color values) as a PNG file and returns the file path where the image is stored.

import { saveRgbAsPng } from 'react-native-png-encoder';

// ...

const savedFilePath = saveRgbAsPng(RGBBuffer);

// Do something with the returned file path

[!NOTE] You can use this function in conjunction with vision-camera-resize-plugin!

Clear the cache folder containing the previously saved PNG files.

Clears the cache folder by deleting previously saved PNG files and returns the count of deleted files.

import { deleteCacheFiles } from 'react-native-png-encoder';

// ...

const filesDeletedCount = deleteCacheFiles();

[!NOTE] I'd recommend on calling this function regularly (I.E. when the app becomes active), especially if you save a lot of data.

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Made with create-react-native-library

Keywords

react-native

FAQs

Package last updated on 11 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts