GithubHelp home page GithubHelp logo

software-mansion-labs / react-native-heic-converter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maxim-kolesnikov/react-native-heic-converter

0.0 2.0 0.0 223 KB

Convert your HEIC files with React Native

License: MIT License

JavaScript 13.91% Objective-C 78.60% Ruby 7.49%

react-native-heic-converter's Introduction

react-native-heic-converter

npm version npm MIT Platform - iOS issues

Contribution

Issues are welcome. Please add a code snippet. Quickest way to solve issue is to reproduce it on one of the examples in DEMO.

Pull requests are welcome. If you want to change API or making something big better to create issue and discuss it first. Before submiting PR please run eslint . Also all eslint fixes are welcome.

Getting started

$ npm install react-native-heic-converter --save

Features

  • Returns the data for the specified image in JPEG format.
  • Returns the data for the specified image in PNG format.
  • Returns the data for the encoded image in base64 format.
  • Value of compression quality
  • Support representation of an image in the Photos library.
  • Save to the photo gallery

Mostly automatic installation

$ react-native link react-native-heic-converter

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  2. Go to node_modulesreact-native-heic-converter and add RNHeicConverter.xcodeproj
  3. In XCode, in the project navigator, select your project. Add libRNHeicConverter.a to your project's Build PhasesLink Binary With Libraries
  4. Run your project (Cmd+R)<

Static Methods

RNHeicConverter.convert(options{}).then(result{})

Options

Property Type Default Description
path string Path to your .HEIC file
quality number 1 Set quality 0 to 1, for jpg extension only
extension string jpg File extension that you want get when convert: jpg or png or base64

Usage

import RNHeicConverter from 'react-native-heic-converter';

RNHeicConverter
    .convert({ // options
        path: '/path/to/file.heic',
    })
    .then((result) => {
        console.log(result); // { success: true, path: "path/to/jpg", error, base64, }
    });

Please have a look at my example usage.

CHANGELOG

react-native-heic-converter's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.