daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Sep 4th, 2018 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ## imagemagick convert
  2. CONVERT=`which convert`
  3.  
  4. ## Normal, should be at least 1024x1024
  5. SRC_NAME=app_icon.png
  6. ## Rounded (as used by newer Android), should be at least 1024x1024
  7. SRC_RNAME=app_icon.png
  8.  
  9. ## Dest Image Path
  10. DEST=app_icons
  11.  
  12. all: create_app_icon_ios create_app_icon_android
  13.  
  14. create_app_icon_ios:
  15.     -mkdir -p $(DEST)
  16.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 180x180 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_iphone\@3x.png
  17.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 120x120 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_iphone\@2x.png
  18.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 120x120 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_spotlight\@3x.png
  19.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 80x80 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_spotlight\@2x.png
  20.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 87x87 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_settings\@3x.png
  21.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 58x58 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_settings\@3x.png
  22.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 60x60 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_notification\@3x.png
  23.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 40x40 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_notification\@2x.png
  24.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 1024x1024 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_itunes\@1x.png
  25.  
  26.  
  27. create_app_icon_android:
  28.     -mkdir -p $(DEST)
  29.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 48x48 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_mdpi.png
  30.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 72x72 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_hdpi.png
  31.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 96x96 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_xhdpi.png
  32.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 144x144 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_xxhdpi.png
  33.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 192x192 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_xxxhdpi.png
  34.     $(CONVERT) $(SRC_NAME) -filter Lanczos -resize 512x512 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_playstore.png
  35.     $(CONVERT) $(SRC_RNAME) -filter Lanczos -resize 48x48 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_rounded_mdpi.png
  36.     $(CONVERT) $(SRC_RNAME) -filter Lanczos -resize 72x72 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_rounded_hdpi.png
  37.     $(CONVERT) $(SRC_RNAME) -filter Lanczos -resize 96x96 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_rounded_xhdpi.png
  38.     $(CONVERT) $(SRC_RNAME) -filter Lanczos -resize 144x144 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_rounded_xxhdpi.png
  39.     $(CONVERT) $(SRC_RNAME) -filter Lanczos -resize 192x192 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_rounded_xxxhdpi.png
  40.     $(CONVERT) $(SRC_RNAME) -filter Lanczos -resize 512x512 -background 'rgba(0,0,0,0)' $(DEST)/app_icon_rounded_playstore.png
  41.  
  42. .PHONY: create_app_icon_ios create_app_icon_android
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top