add 20pt icon and use GraphicsMagick instead of ImageMagick
This commit is contained in:
parent
aa92a39f15
commit
410c331ba6
2 changed files with 5 additions and 4 deletions
|
|
@ -12,12 +12,12 @@ def scale_retina(width, height, scale, in_file, out_dir, prefix)
|
|||
filename = "#{prefix}#{file_scale}.png"
|
||||
out_file = File.join(out_dir, filename)
|
||||
puts "> convert '#{in_file}' -scale #{width * scale}x#{height * scale} '#{out_file}'"
|
||||
output = `convert '#{in_file}' -scale #{width * scale}x#{height * scale} '#{out_file}'`.strip
|
||||
output = `gm convert '#{in_file}' -scale #{width * scale}x#{height * scale} '#{out_file}'`.strip
|
||||
puts output if output.length > 0
|
||||
end
|
||||
|
||||
def image_dimensions(path)
|
||||
`identify '#{path}'`.split[2].split('x').map(&:to_i)
|
||||
`gm identify '#{path}'`.split[2].split('x').map(&:to_i)
|
||||
end
|
||||
|
||||
in_file, out_dir, prefix, raw_width, raw_height = ARGV
|
||||
|
|
|
|||
|
|
@ -19,8 +19,9 @@ if [[ ! -d "$OUT_DIR" ]]; then
|
|||
exit 2
|
||||
fi
|
||||
|
||||
for SIZE in 29 40 60 76 83.5; do
|
||||
PREFIX="${IN_FILE%.png}_$SIZE"
|
||||
for SIZE in 20 29 40 60 76 83.5; do
|
||||
FILENAME=$(basename "$IN_FILE")
|
||||
PREFIX="${FILENAME%.png}_$SIZE"
|
||||
echo "* Generating app icons at $SIZE points with filename prefix $PREFIX"
|
||||
retina-scale "$IN_FILE" "$OUT_DIR" "$PREFIX" $SIZE $SIZE
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in a new issue