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

@smartface/image-processor

Package Overview
Dependencies
Maintainers
7
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@smartface/image-processor

iOS, Android image processor with different scales

1.1.0
npm
Version published
Weekly downloads
1
-75%
Maintainers
7
Weekly downloads
 
Created
Source

image-processor · npm version

Generates imagesets for iOS and drawables for Android

Installation

npm i -g @smartface/image-processor

Usage

sfImageProcessor  --srcImage [IMAGE-PATH] --destiOSFolder [DEST_IOS_FOLDER] --destAndroidFolder [DEST_ANDROID_FOLDER]

--srcImage         : must be absolute path (required)
--destiOSFolder    : must be absolute path (required)
--destAndroidFolder: must be absolute path (required)
--scaleFactor      : scale factor of given 'srcImage' float value ( 1.5, 3) (optional)
--delete           : flag -> delete images from 'destiOSFolder' and 'destAndroidFolder' (optional)

Description

  • parse srcImage
    • image(.$(OS))(.$(SCALE)).png
  • generate images by $(OS) and $(SCALE)

Default $(SCALE) is 3x

Examples

srcImage=smartface.png

sfImageProcessor --srcImage=/images/smartface.png --destAndroidFolder=/android --destiOSFolder=/ios

Generates:

  • /ios/smartface.imageset
    • smartface.png
    • smartface@2x.png
    • smartface@3x.png
  • /android/drawable-mdpi/smartface.png
  • /android/drawable-hdpi/smartface.png
  • /android/drawable-xhdpi/smartface.png
  • /android/drawable-xxhdpi/smartface.png

srcImage=smartface.ios.png

sfImageProcessor --srcImage=/images/smartface.ios.png --destAndroidFolder=/android --destiOSFolder=/ios

Generates:

srcImage=smartface.ios.2x.png

sfImageProcessor --srcImage=/images/smartface.ios.2x.png --destAndroidFolder=/android --destiOSFolder=/ios

Generates:

srcImage=smartface.android.4x.png

sfImageProcessor --srcImage=/images/smartface.android.4x.png --destAndroidFolder=/android --destiOSFolder=/ios

Generates:

  • /android/drawable-mdpi/smartface.png
  • /android/drawable-hdpi/smartface.png
  • /android/drawable-xhdpi/smartface.png
  • /android/drawable-xxhdpi/smartface.png
  • /android/drawable-xxxhdpi/smartface.png

Note

If --delete flag is set, deletes generated images.

Keywords

smartface

FAQs

Package last updated on 19 Sep 2018

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