Goimer is a package written in Go for merging a frame image with a set of second images. This allows you to create composite images by resizing and combining the frame and second images. It supports multiple image formats and provides flexibility in specifying the output directory and format.
- Merge a frame image with a directory of second images.
- Resize second images to match the dimensions of the frame image.
- Save the merged images in a specified output directory.
- Support for various image formats: JPEG, PNG, and WebP.
- Download the latest binary for your operating system from the releases page.
- Open a terminal and navigate to the directory containing the binary.
- Run the binary with the following command:
- Linux:
./goimer_linux
- Windows:
goimer.exe
- macOS:
./goimer_darwin
- Note: You may need to grant the binary executable permissions. For example, on Linux, you can run
chmod +x goimer_linux
to grant executable permissions to the binary. - Note: According to the Go FAQ, you may need to add an exception to your antivirus software to run the binary.
- Linux:
- Follow the prompts to enter the required information:
- Frame image filename
- Directory containing the second images
- Output directory
- Wait for the process to complete.
go get -u github.com/muharamdani/goimer
package main
import "github.com/muharamdani/goimer/pkg/imagemerge"
func main() {
// You can use fmt.Scanln() to get the input from user, or you can hardcode it
cfg := imagemerge.MergeOptions{
FrameImagePath: "frame/frame_file.png",
SecondImageDir: "bunch_of_image_dir",
OutputDir: "output_dir",
}
if err := imagemerge.MergeImages(cfg); err != nil {
return
}
}
- JPEG
- PNG
- WebP
Contributions are welcome! If you find any issues or have ideas for improvements, please open an issue or submit a pull request.
This project is licensed under the Apache License 2.0.