icon-generator
31
总安装量
23
周安装量
#11771
全站排名
安装命令
npx skills add https://github.com/dkyazzentwatwa/chatgpt-skills --skill icon-generator
Agent 安装分布
opencode
16
claude-code
16
gemini-cli
15
cursor
13
codex
12
Skill 文档
Icon Generator
Generate app icons in all required sizes from a single image.
Features
- Multi-Platform: iOS, Android, Web, macOS, Windows
- Batch Generation: All sizes from one source
- Smart Scaling: Maintain quality at all sizes
- Format Support: PNG, ICO, ICNS
- Presets: Platform-specific size sets
- Rounding Options: Square or rounded corners
Quick Start
from icon_generator import IconGenerator
gen = IconGenerator()
# Generate all iOS icons
gen.load("logo.png")
gen.generate_ios("ios_icons/")
# Generate all favicon sizes
gen.load("logo.png")
gen.generate_favicon("favicon/")
# Generate specific sizes
gen.load("logo.png")
gen.generate_sizes([16, 32, 64, 128, 256, 512], "icons/")
CLI Usage
# Generate iOS icons
python icon_generator.py --input logo.png --preset ios --output-dir ios_icons/
# Generate Android icons
python icon_generator.py --input logo.png --preset android --output-dir android_icons/
# Generate favicons
python icon_generator.py --input logo.png --preset favicon --output-dir favicon/
# Custom sizes
python icon_generator.py --input logo.png --sizes 16 32 64 128 256 -o icons/
# Generate all platforms
python icon_generator.py --input logo.png --preset all --output-dir app_icons/
API Reference
IconGenerator Class
class IconGenerator:
def __init__(self)
# Loading
def load(self, filepath: str) -> 'IconGenerator'
# Generation
def generate_ios(self, output_dir: str) -> List[str]
def generate_android(self, output_dir: str) -> List[str]
def generate_favicon(self, output_dir: str) -> List[str]
def generate_macos(self, output_dir: str) -> List[str]
def generate_windows(self, output_dir: str) -> List[str]
def generate_pwa(self, output_dir: str) -> List[str]
def generate_all(self, output_dir: str) -> Dict[str, List[str]]
# Custom
def generate_sizes(self, sizes: List[int], output_dir: str,
prefix: str = "icon") -> List[str]
def generate_single(self, size: int, output: str) -> str
# Options
def set_rounding(self, radius_percent: float) -> 'IconGenerator'
def set_padding(self, padding_percent: float) -> 'IconGenerator'
def set_background(self, color: Tuple) -> 'IconGenerator'
Platform Sizes
iOS (App Store)
- 20×20, 29×29, 40×40, 60×60, 76×76, 83.5×83.5
- 1024×1024 (App Store)
- @2x and @3x variants
Android
- mdpi: 48×48
- hdpi: 72×72
- xhdpi: 96×96
- xxhdpi: 144×144
- xxxhdpi: 192×192
- Play Store: 512×512
Favicon
- 16×16, 32×32, 48×48
- 180×180 (Apple Touch)
- 192×192, 512×512 (PWA)
Windows
- 16×16, 32×32, 48×48
- 256×256 (ICO)
Dependencies
- pillow>=10.0.0