New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-native-transformable-image

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-transformable-image

A transformable image component, as the known **PhotoView** or **ImageViewer**, supports gestures like pan, pinch, double tab and fling, is written in **pure JavaScript**, supports **both iOS and Android**.

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
decreased by-77.94%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-transformable-image

A transformable image component, as the known PhotoView or ImageViewer, supports gestures like pan, pinch, double tab and fling, is written in pure JavaScript, supports both iOS and Android.

Install

npm install --save react-native-transformable-image@latest

Usage

Quite same as the official Image, as below shows:

import Image from 'react-native-transformable-image';
...
render() {
    return (
      ...
        <Image
          style={{width: width, height: height}}
          source={{uri: 'https://raw.githubusercontent.com/yoaicom/resources/master/images/game_of_thrones_1.jpg'}}
          //pixels={{width: 3607, height: 2400}}
        />
      ...
    );
  }

The pixels prop is used to align the edge of the image content with the view's boundry and to determine the max scale. This prop is optional if the image is remote (like source={{uri: 'http://remoteurl'}}) and you are using react-native 0.28 and above.(This component will use Image.getSize to get pixels info both on iOS and Android since release v0.28-rc when no pixels prop provided.

If your image is local (like source={require('...')}) or you are using react-native v0.27 and below, you should provide the pixels prop, wraping the image's width and height.(You can ask your API server to provide image pixels info)

FAQs

Package last updated on 15 Jun 2016

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc