Project

retinator

0.0
No commit activity in last 3 years
No release in over 3 years
Generates @1x, @2x and @3x images versions of an image for iOS projects
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 5.0
~> 10.0

Runtime

~> 0.8.1
 Project Readme

Retinator Build Status

Retinator resizes the source image and generates three images in @1x, @2x and @3x iOS resolutions.

retinator-gif

Usage

retinator source_image destination_resolution
  • source_image: path to the source image
  • destination_resolution: a number indicating the resolution of the smaller dimension of the destination @1x image

Example

For an input image of 3000x1500, retinator test.jpg 200 will output:

test.png    (400x200)
test@2x.png (800x400)
test@3x.png (1200x600)

Installation

This gem needs ImageMagick or GraphicksMagick in order to run. It has to be installed using a brew formula. Run this command in your terminal:

brew install graphicsmagick

After that you can install the tool the usual way:

gem install retinator

Or, in dev mode:

bundle install
gem build retinator.gemspec
gem install retinator-[VERSION].gem

TODO

  • Allow batch processing