Skip to content
/ anime Public

anime is a compact Bash script designed to streamline the process of creating different density versions of an image, a common task in Android development.

License

Notifications You must be signed in to change notification settings

palsega/anime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

anime - ANdroid IMagE resizer

(based on ImageMagick)

anime is a compact Bash script designed to streamline the process of creating different density versions of an image, a common task in Android development.

Description

The anime script takes an image and generates resized versions for different Android densities (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi). It then checks if all necessary subdirectories exist in the target directory, creating them if needed. Finally, it places the resized images into their respective subdirectories.

This simplifies the process of generating multiple image versions from a single source and automatically adding them to the desired directory in an Android Studio project.

Prerequisites

The script requires ImageMagick to be installed on your system, additionally be sure the path to ImageMagick is added to the system PATH variable

Usage

Here's the general structure of the command:

bash <path-to-bash_script>/anime.sh <path-to-image>/image.png <path-to-desired-storage-for-images>

Note:
replace <path-to-bash_script>/anime.sh with the path to the anime script, <path-to-image>/image.png with the path to the original image, and <path-to-desired-storage-for-images> with the path where you want to save the resized images.

Explanation for coders 😊, assuming that the following conditions apply:

  • You’re using the anime script in the Android Studio terminal (project root directory),
  • Both the anime script and the image are located on your Desktop,
  • And you intend to generate images for the app module of your application

so then use the following command:

bash ~/Desktop/anime.sh ~/Desktop/image.png app/src/main/res

About

anime is a compact Bash script designed to streamline the process of creating different density versions of an image, a common task in Android development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages