npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-image-file-transformer

v1.0.4-beta.0

Published

Scale, Convert & Compress animated & static image files. Supports It works with image files rather view and let's you use the transofmred image files.

Downloads

562

Readme

React Bative Image File Transformer

convert, compress, scale any animated or static image

image-removebg-preview1-ezgif com-resize (3)

npm version

react-native-image-file-transformer is a React Native module that provides functionality for transforming and manipulating image files.

Platform support:

  • [x] Android
  • [ ] ios

Installation

npm install react-native-image-file-transformer

Usage

Import:

import { Transform } from 'react-native-image-file-transformer';

Operations:

await Transform.static([uri2, uri2,... ], options);
await Transform.animated([uri1, uri2,... ], options);

Constants:

ScaleMode:
Transform.ScaleMode.CROP
Transform.ScaleMode.STRETCH
Transform.ScaleMode.FIT_CENTER

FormatType:
Transform.FormatType.JPEG
Transform.FormatType.PNG
Transform.FormatType.WEBP
Transform.FormatType.GIF
Transform.FormatType.AWEBP
Transform.FormatType.UNKNOWN
 

Misc:

await Transform.getImageType([uri1, uri2, ...])

// Output
//[{"extention": "png", "isAnimated": false, "type": "PNG_A", "uri": "/storage/emulated/..."}] 
await Transform.clearCache()

Example:

Transform.animated(uris, { 
  width:100, // default will be taken from image
  height:100, // default will be taken from image
  quality:70,  // default 100
  scaleMode:Transform.ScaleMode.FIT_CENTER, // default FIT_CENTER
  targetFormat:Transform.FormatType.AWEBP, // default JPGE/GIF
//   minDelay:80, (ms)
//   maxDelay:1000, (ms)
//   parentDir:"storage/emulated/0/Download/output"
})
.then(r=>{log(r)})
.catch(e=>{log('error ',e)})

Contribution

If you find any issues or have suggestions for improvements, please open an issue or submit a pull request on the project's GitHub repository. CONTRIBUTING.md

Contact on:

X (twitter) : x.com/heyKSR

License

LICENSE