Skip to content

Instantly share code, notes, and snippets.

Avatar

Klaus Schwartz tntclaus

  • eRaga Infosystems
  • Russia, Moscow
View GitHub Profile
@tntclaus
tntclaus / generateAndroidDrawables.sh
Last active Jun 26, 2020
Simple Android drawable image resource generator script with specified DP with ImageMagic or Inkscape
View generateAndroidDrawables.sh
#!/bin/sh
# Example usage:
# ./generateAndroidDrawables.sh my_image.png 140 /absolute/path/to/android/res/drawables
#
# Will generate 140dp android drawables for 6 DPI on out/my_image.png/ directory.
# Be sure your original image has sustainable resolution for xxxhdpi drawable,
# which is 140 x 4 PX in case of this example.
#
# Requires ImageMagic
# SVG conversion recommended to be done with Inkscape:
You can’t perform that action at this time.