https://github.com/cerberusprogrammer/image-converter
https://github.com/cerberusprogrammer/image-converter
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/cerberusprogrammer/image-converter
- Owner: CerberusProgrammer
- Created: 2025-02-24T16:01:47.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-24T16:11:43.000Z (about 1 year ago)
- Last Synced: 2025-02-24T17:27:21.049Z (about 1 year ago)
- Language: Go
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.