Skip to content
Browse files

Merge pull request #412 from ngauthier/master

scale icons instead of sampling
  • Loading branch information...
2 parents 98fa221 + b831f83 commit fb31285534632d573bd90614c87594cd995cacae @ngauthier ngauthier committed Mar 29, 2012
Showing with 6 additions and 6 deletions.
  1. +6 −6 builder/bundle.rb
View
12 builder/bundle.rb
@@ -123,13 +123,13 @@ def icons_and_screens
# sample the icons to the appropriate sizes
# iPad needs the 2x icon, too, otherwise Apple complains.
- system %{convert #{File.join(@icons[:location], 'app_icon_phone.png')} -sample 57x57! \
+ system %{convert #{File.join(@icons[:location], 'app_icon_phone.png')} -resize 57x57! \
#{File.join(project_icons_dir, 'icon.png')}
}
icon_2x_path = File.join(project_icons_dir, 'icon@2x.png')
if is_phone
- system %{convert #{File.join(@icons[:location], 'app_icon_phone.png')} -sample 114x114! \
+ system %{convert #{File.join(@icons[:location], 'app_icon_phone.png')} -resize 114x114! \
#{icon_2x_path}
}
else
@@ -141,7 +141,7 @@ def icons_and_screens
if is_phone
FileUtils.remove_file icon_72_path
else
- system %{convert #{File.join(@icons[:location], 'app_icon_tablet.png')} -sample 72x72! \
+ system %{convert #{File.join(@icons[:location], 'app_icon_tablet.png')} -resize 72x72! \
#{icon_72_path}
}
end
@@ -157,7 +157,7 @@ def icons_and_screens
if File.exists? portrait_image
if is_phone
# Force a downsample
- system %{convert #{portrait_image} -sample 320x480! \
+ system %{convert #{portrait_image} -resize 320x480! \
#{File.join(project_splash_dir, 'Default.png')}
}
@@ -213,11 +213,11 @@ def icons_and_screens
end
%w(hdpi ldpi mdpi).each do |resolution|
- system %{convert #{File.join(@icons[:location], 'app_icon_phone.png')} -sample #{icon_size.call resolution}! \
+ system %{convert #{File.join(@icons[:location], 'app_icon_phone.png')} -resize #{icon_size.call resolution}! \
#{File.join(@project_dir, 'res', "drawable-#{resolution}", 'icon.png')}
}
- system %{convert #{ File.join(@load_screens[:location], 'phone_portrait.png') } -sample #{screen_size.call resolution}! \
+ system %{convert #{ File.join(@load_screens[:location], 'phone_portrait.png') } -resize #{screen_size.call resolution}! \
#{File.join(@project_dir, 'res', "drawable-#{resolution}", 'splash.png')}
}
end

0 comments on commit fb31285

Please sign in to comment.
Something went wrong with that request. Please try again.