Skip to content

ed-terry/ImageToIco

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎨 ImageTo-ICO Converter

A powerful and modern CLI and GUI application to convert images to ICO format with ease. Built with Node.js, Electron, and Sharp for high-quality image processing.

Version Node License Platform

Features

πŸ–₯️ CLI Features

  • Powerful Command-Line Interface - Convert images with simple commands
  • Batch Processing - Convert multiple images at once
  • Custom Icon Sizes - Choose from 16x16 to 256x256 or specify custom sizes
  • Progress Indicators - Real-time progress bars and status updates
  • Colorful Output - Beautiful, easy-to-read terminal output
  • Multiple Format Support - JPG, PNG, WebP, GIF, SVG, TIFF, BMP

🎨 GUI Features

  • Modern Sleek Interface - Beautiful gradient design with glass-morphism effects
  • Drag & Drop - Simply drag images into the window
  • Batch Conversion - Convert multiple files simultaneously
  • Live Preview - See conversion progress in real-time
  • Custom Settings - Select icon sizes and output directory
  • Statistics Dashboard - Track conversions, successes, and failures
  • Cross-Platform - Works on Windows, macOS, and Linux

πŸ“¦ Installation

Prerequisites

  • Node.js 16.0.0 or higher
  • npm or yarn

Install Dependencies

npm install

Or with yarn:

yarn install

πŸš€ Usage

CLI Usage

Basic Conversion

node src/cli.js convert image.png

Specify Output Path

node src/cli.js convert input.jpg output.ico

Custom Icon Sizes

node src/cli.js convert image.png -s 16,32,48,256

Batch Conversion

node src/cli.js batch image1.png image2.jpg image3.webp -o ./icons

Quiet Mode (No Output)

node src/cli.js convert image.png -q

Show Information

node src/cli.js info

GUI Usage

Launch the GUI

npm start

Or use the CLI command:

node src/cli.js gui

Using the GUI

  1. Add Files: Drag and drop images or click "Browse Files"
  2. Select Sizes: Choose which icon sizes to include (16x16 to 256x256)
  3. Set Output: Choose where to save converted icons
  4. Convert: Click "Convert All" or select a file and click "Convert Selected"
  5. Monitor: Watch real-time progress and statistics

🎯 CLI Commands Reference

Convert Command

imageto-ico convert <input> [output] [options]

Arguments:
  input                    Input image file path
  output                   Output ICO file path (optional)

Options:
  -s, --sizes <sizes>      Icon sizes (comma-separated, e.g., 16,32,48,256)
                          Default: 16,32,48,64,128,256
  -q, --quiet             Suppress output messages
  -h, --help              Display help for command

Batch Command

imageto-ico batch <input...> [options]

Arguments:
  input...                 Input image file paths

Options:
  -o, --output <dir>      Output directory (default: "./output")
  -s, --sizes <sizes>     Icon sizes (comma-separated)
                          Default: 16,32,48,64,128,256
  -q, --quiet            Suppress output messages
  -h, --help             Display help for command

Info Command

imageto-ico info

Display supported formats and default settings

GUI Command

imageto-ico gui

Launch the graphical user interface

πŸ“‹ Supported Input Formats

  • JPEG (.jpg, .jpeg)
  • PNG (.png)
  • WebP (.webp)
  • GIF (.gif)
  • SVG (.svg)
  • TIFF (.tiff, .tif)
  • BMP (.bmp)

🎨 Icon Sizes

Standard sizes included:

  • 16Γ—16 (Small toolbar icons)
  • 32Γ—32 (Standard toolbar icons)
  • 48Γ—48 (Large toolbar icons)
  • 64Γ—64 (Extra large icons)
  • 128Γ—128 (High DPI displays)
  • 256Γ—256 (Ultra high DPI displays)

πŸ—οΈ Project Structure

imageto-ico/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ converter.js       # Core conversion logic
β”‚   β”œβ”€β”€ cli.js            # Command-line interface
β”‚   β”œβ”€β”€ main.js           # Electron main process
β”‚   └── preload.js        # Electron preload script
β”œβ”€β”€ renderer/
β”‚   β”œβ”€β”€ index.html        # GUI main page
β”‚   └── renderer.js       # GUI logic and interactions
β”œβ”€β”€ package.json          # Project dependencies
└── README.md            # This file

πŸ› οΈ Development

Run in Development Mode

npm run dev

Build for Production

npm run build

CLI Development

npm run cli -- convert test.png

πŸ“ Examples

Example 1: Quick Conversion

# Convert a PNG to ICO with default settings
node src/cli.js convert logo.png

Example 2: Custom Sizes

# Create ICO with only small sizes
node src/cli.js convert icon.png icon.ico -s 16,32,48

Example 3: Batch Processing

# Convert all PNGs in current directory
node src/cli.js batch *.png -o ./output-icons

Example 4: Silent Batch

# Batch convert without output messages
node src/cli.js batch img1.jpg img2.png img3.webp -o ./icons -q

πŸ’‘ Tips for Best Results

  1. Use Square Images - Icons look best when starting from square images
  2. High Resolution - Start with at least 256Γ—256 for best quality
  3. Transparent Backgrounds - PNG files with transparency work great
  4. Simple Designs - Icons with clear, simple designs scale better
  5. Test Multiple Sizes - Always check how your icon looks at different sizes

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Sharp - High-performance image processing
  • Commander.js - CLI framework
  • Electron - Cross-platform desktop apps
  • Chalk & Ora - Beautiful terminal output
  • Tailwind CSS - Modern styling

πŸ“ž Support & Issues

If you encounter any issues or have questions:

  1. Check the documentation above
  2. Run node src/cli.js info for format information
  3. Try with different image formats
  4. Ensure Node.js version is 16.0.0 or higher

πŸ‘€ About The Author

Edward Joseph Terry - Full Stack Developer

I'm passionate about building tools that making developers' lives easier. Check out my other projects and work:


Made with ❀️ by Edward Terry

**Happy Converting!

About

Convert any image to ICO format. Built with Node.js, featuring both CLI and GUI interfaces.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors