React-native-image-generator - Library to generate images from layers

Overview

react-native-image-generator

Library for generate images from other images

Installation

yarn add react-native-image-generator

Usage

import { generate } from 'react-native-image-generator';

// ...
const r = await generate(
  [
    {
      uri: 'https://picsum.photos/200/300',
      width: 200,
      height: 300,
      x: 0,
      y: 0,
    },
    {
      uri: 'Mario', // named asset or assets file in android
      width: 200,
      height: 300,
      x: 0,
      y: 0,
    },
    {
      text: 'DESIGN',
      fontSize: 23,
      width: 300,
      height: 300,
      x: 50,
      y: 50,
      color: [0, 255, 0, 1.0],
      fontFamily: Platform.OS === 'ios' ? 'Helvetica' : 'Roboto',
    },
  ],
  {
    filename: 'test.png',
    width: 200,
    height: 300,
  }
);

Result

Hot to use assets

To use local image you need to put it in assets

iOS

In iOS you need to put it Images:

Android

Make sure that your file placed here android/app/src/main/assets/. For example: android/app/src/main/assets/Mario

Platforms

  • iOS
  • Android

License

MIT

You might also like...
High Quality Image ScrollView using cropped tiled images.
High Quality Image ScrollView using cropped tiled images.

THTiledImageView Feature πŸ–Ό THTiledImageView fully support UIScrollView. You can subclass it and use it. πŸ“‘ Support Async Image Downloading & Caching.

WhiteAndFluffyTest - Scroll images and add them to your favourites via image page
WhiteAndFluffyTest - Scroll images and add them to your favourites via image page

Image service application Scroll images and add them to your favourites via imag

πŸ“· A composable image editor using Core Image and Metal.
πŸ“· A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component πŸŽ‰ v2.0.0-alpha now open!

An image download extension of the image view written in Swift for iOS, tvOS and macOS.
An image download extension of the image view written in Swift for iOS, tvOS and macOS.

Moa, an image downloader written in Swift for iOS, tvOS and macOS Moa is an image download library written in Swift. It allows to download and show an

πŸ“· A composable image editor using Core Image and Metal.
πŸ“· A composable image editor using Core Image and Metal.

Brightroom - Composable image editor - building your own UI Classic Image Editor PhotosCrop Face detection Masking component πŸŽ‰ v2.0.0-alpha now open!

AsyncImage before iOS 15. Lightweight, pure SwiftUI Image view, that displays an image downloaded from URL, with auxiliary views and local cache.

URLImage URLImage is a SwiftUI view that displays an image downloaded from provided URL. URLImage manages downloading remote image and caching it loca

A complete Mac App: drag an image file to the top section and the bottom section will show you the text of any QRCodes in the image.

QRDecode A complete Mac App: drag an image file to the top section and the bottom section will show you the text of any QRCodes in the image. QRDecode

Convert the image to hexadecimal to send the image to e-paper

ConvertImageToHex Convert the image to hexadecimal to send the image to e-paper Conversion Order // 0. hex둜 λ³€ν™˜ν•  이미지 var image = UIImage(named: "sample

Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS clients

Twitter Image Pipeline (a.k.a. TIP) Background The Twitter Image Pipeline is a streamlined framework for fetching and storing images in an application

Comments
  • ImageGenerator requires main queue setup warning

    ImageGenerator requires main queue setup warning

    On a fresh install, on startup, the app reports a LogBox warning:

    Warning

    Module ImageGenerator requires main queue setup since it overrides 'init' but doesn't implement 'requiresMainQueueSetup'. In a future release React Native will default to initializing all native modules on a background thread unless explicitly opted-out of.

    Environment:

    "react": "17.0.2", "react-native": "0.68.1",

    Expected Behavior

    No warning produced.

    Code Example

    None needed, happens on install without any implementation

    Screenshot

    Simulator Screen Shot - iPhone 13 - 2022-08-11 at 16 39 11

    opened by jonnypage 1
  • fontFamily for Text doesn't work.

    fontFamily for Text doesn't work.

    No matter what fontFamily I use, the generated text looks pixelated like this: Screenshot_20220429_164614

    react-Native: 0.66.4 react-native-image-generator: 0.3.0 Platform: Android

    opened by Gabsys 1
Releases(v0.3.1)
Owner
Evgeny Usov
Evgeny Usov
SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

SwiftGen is a tool to automatically generate Swift code for resources of your projects (like images, localised strings, etc), to make them type-safe to use.

null 8.3k Jan 5, 2023
IconsMaker - Create your app icon with SwiftUI and generate PNG images in all needed sizes

IconsMaker - Create your app icon with SwiftUI and generate PNG images in all needed sizes

Jonathan Gander 14 Oct 20, 2022
iOS hashtag generator, using image analysis and discovery

Tagger Description Want to be popular on some social network easily? Use Tagger to make your account content more popular and to raise your popularity

Ivan Magda 44 Dec 17, 2022
Random image generator built with Swift

Ody Ody is an easy to use random image generator built with Swift. Perfect for placeholders! Built with [Silo] silojq, [LoremPixel] images, and FillDu

Jose Quintero 46 Dec 14, 2020
A high-performance image library for downloading, caching, and processing images in Swift.

Features Asynchronous image downloader with priority queuing Advanced memory and database caching using YapDatabase (SQLite) Guarantee of only one ima

Yap Studios 72 Sep 19, 2022
FlaneurImagePicker is an iOS image picker that allows users to pick images from different sources (ex: user's library, user's camera, Instagram...). It's highly customizable.

FlaneurImagePicker is a highly customizable iOS image picker that allows users to pick images from different sources (ex: device's library, device's c

FlaneurApp 17 Feb 2, 2020
AYImageKit is a Swift Library for Async Image Downloading, Show Name's Initials and Can View image in Separate Screen.

AYImageKit AYImageKit is a Swift Library for Async Image Downloading. Features Async Image Downloading. Can Show Text Initials. Can have Custom Styles

Adnan Yousaf 11 Jan 10, 2022
Agrume - πŸ‹ An iOS image viewer written in Swift with support for multiple images.

Agrume An iOS image viewer written in Swift with support for multiple images. Requirements Swift 5.0 iOS 9.0+ Xcode 10.2+ Installation Use Swift Packa

Jan Gorman 601 Dec 26, 2022
Image viewer (or Lightbox) with support for local and remote videos and images

Table of Contents Features Focus Browse Rotation Zoom tvOS Setup Installation License Author Features Focus Select an image to enter into lightbox mod

Nes 534 Jan 3, 2023
Jogendra 113 Nov 28, 2022