Project

XCUtils

0.0
No commit activity in last 3 years
No release in over 3 years
This is a little helper to resize @2x~ipad artwork to all required sizes using rmagick. \x5On top, the output will be formatted to suit XCodes requirements for sprite atlases or xcassets. \x5Images will be resized carefully using 'HammingFilter'.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

~> 1.3
>= 0
~> 2.13.2
>= 0
 Project Readme

Gem Version

XCUtils

This is a little helper to resize @2x~ipad artwork to all required sizes using rmagick and assign names by xcode convention like @2x, ~ipad etc. On top, the output will be formatted to suit XCodes requirements for sprite atlases or xcassets. Images will be resized carefully by using the 'HammingFilter'.

Installation

Add this line to your application's Gemfile:

gem 'XCUtils'

And then execute:

$ bundle

Or install it yourself as:

$ gem install XCUtils

Usage

run

xcutils help [COMMAND]  # Describe available commands or one specific command
xcutils resize          # Resize single image or directory to all available sizes and optionally pack in xcassets or xcatlas folder
xcutils sort            # sort directory of all sizes artwork into separate image atlases per size

Configuration

To ease batch tasks, there is the possibility to add a .xcutils-config into your source directory providing where you can override the default scale factors:

scale_iphone_1x       = 0.25
scale_iphone_2x       = 0.5
scale_iphone_3x       = 1.0
scale_ipad_1x         = 0.5
scale_ipad_2x         = 1.0

create_image_assets   = false
create_xcatlas        = false
dry_run               = false

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request