An open API service indexing awesome lists of open source software.

https://github.com/cerberusprogrammer/image-converter


https://github.com/cerberusprogrammer/image-converter

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# Image Converter

This project is an image converter that allows users to convert images from one format to another using command-line flags. It detects the original format of the image and performs the conversion accordingly.

## Available Formats

The image converter supports the following formats:

- JPEG (`.jpg`, `.jpeg`)
- PNG (`.png`)
- GIF (`.gif`)

## Future Improvements

Here are some potential improvements that could be made to the project:

- Add support for BMP and TIFF formats.
- Add support for HEIC format.
- Add support for SVG format.
- Add support for WebP format.
- Add support for ICO format.
- Add support for converting images in bulk.
- Add support for converting images to different file names.
- Add support for converting images to different sizes.
- Add support for converting images to grayscale.
- Add support for converting images to different quality levels.
- Add support for converting images to different DPI settings.
- Add support for converting images to different color spaces.
- Add support for converting images to different compression methods.

## Project Structure

```
image-converter
├── cmd
│ └── converter
│ └── main.go # Entry point of the application
├── internal
│ ├── converter
│ │ └── converter.go # Core logic for converting images
│ └── format
│ └── format.go # Format detection and supported formats
├── README.md # Project documentation
└── go.mod # Module definition and dependencies
```

## Installation

To install the project, clone the repository and navigate to the project directory:

```bash
git clone
cd image-converter
```

Then, run the following command to download the necessary dependencies:

```bash
go mod tidy
```

## Usage

To use the image converter, run the following command:

```bash
go run cmd/converter/main.go -input -output
```

### Flags

- `-input`: Path to the input image file (required).
- `-output`: Desired output format (e.g., "png", "jpg", "gif") (required).

### Example

```bash
go run cmd/converter/main.go -input example.jpg -output png
```

This command will convert `example.jpg` to `example.png`.

## Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any suggestions or improvements.

## License

This project is licensed under the MIT License. See the LICENSE file for more details.