Ramon Torres

{ i ♥ code }

Images can’t contain alpha channels or transparencies.

While updating the screenshots of one of our apps via the new iTunes Connect interface I was getting the following error:

Images can’t contain alpha channels or transparencies.

I was able to strip out the alpha channels off the App Store assets using ImageMagick's mogrify command.

mogrify -alpha off -format png screenshots/*.png

The mogrify command is an in-place batch processing utility. Extra care has to be taken because by default it will overwrite your images.

Comments

iPhone 5-6 Screen Size Cheat Sheet

iphone-sizes

Logical Coordinate Space (portrait)

Model Size (points) Scale
iPhone 5/5S/5C 320 × 568 @2x
iPhone 6 375 × 667 @2x
iPhone 6 Plus 414 × 736 @3x

Device Coordinate Space

Model Size (pixels)
iPhone 5/5S/5C 640 × 1136
iPhone 6 750 × 1334
iPhone 6 Plus 1,242 × 2,208*

* Downsampled to 1080 × 1920 px.

Comments

SpinKit 1.1

With the help of contributors, I have just released a new version of SpinKit for iOS. This new version adds 9 new animations summing up to 13 animations in total. Here is a video of the demo app cycling through all 13 animations:

Comments

Using Rake to deploy a static site to S3

One of my favorite development tools is Rake. Not so long ago I discovered how great this tool is and started using it for automating development chores.

The Rakefile of a static site project would look something like this:

require "s3"
require "mimemagic"

desc "Deploys the site to S3"
task :upload do |t, args|
  service = S3::Service.new(:access_key_id => "...",
                            :secret_access_key => "...")

  bucket = service.buckets.find("mybucket")

  files = Dir['*.html'].to_a
  files += Dir['css/*.css'].to_a
  files += Dir['js/*.js'].to_a
  files += Dir['img/*.*'].to_a

  files.each do |source|
    object = bucket.objects.build(source)
    object.content = File.open(source)
    object.content_type = MimeMagic.by_path(source)
    object.save
    puts "Uploaded https://#{bucket.name}.s3.amazonaws.com/#{source}"
  end
end

Dependency Management

To manage our dependencies we will use Bundler. The Gemfile should look something like this:

source "http://rubygems.org"

gem "s3"
gem "mimemagic"

Comments

My name is Ramon Torres. I'm a software developer and product designer, currently working at Night Agency and Doodle.ly building cool stuff.