diff --git a/retina-scale b/retina-scale index 7405976..22658c0 100755 --- a/retina-scale +++ b/retina-scale @@ -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 diff --git a/scale-ios-app-icons b/scale-ios-app-icons index 697ec95..75693d8 100755 --- a/scale-ios-app-icons +++ b/scale-ios-app-icons @@ -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