Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neuron-nexus/go-image-upscaler
Simple way to upscale image with Go (Golang)
https://github.com/neuron-nexus/go-image-upscaler
golang golang-library golang-package image image-processing upscale upscaler upscalerimage upscaling
Last synced: 2 months ago
JSON representation
Simple way to upscale image with Go (Golang)
- Host: GitHub
- URL: https://github.com/neuron-nexus/go-image-upscaler
- Owner: neuron-nexus
- License: mit
- Created: 2024-10-04T18:47:16.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-10-04T21:04:03.000Z (4 months ago)
- Last Synced: 2024-10-25T03:55:38.430Z (4 months ago)
- Topics: golang, golang-library, golang-package, image, image-processing, upscale, upscaler, upscalerimage, upscaling
- Language: Go
- Homepage:
- Size: 7.81 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Neuron Nexus Image Upscale
Neuron Nexus Image Upscale is a Go framework for upscaling images. It allows you to frame the original image to fit a custom aspect ratio. The framework allows you to place the image in a frame with the original color (white) or in a frame of a custom color. Images can be imported in .png, .jpg and .gif. Export is available in .png and .jpg.
## Installation
```bash
go get -u github.com/neuron-nexus/go-image-upscaler
```## Usage (v1.0.1)
```go
package mainimport (
"image/color"
"log"
"os"imageupscaler "github.com/neuron-nexus/go-image-upscaler"
)func main() {
upscaler := imageupscaler.New()
err := upscaler.SetImage("./test.jpg")
if err != nil {
log.Fatal(err)
}file, err := os.Create("./test2.jpg")
if err != nil {
log.Fatal(err)
}
defer file.Close()//upscaler.Upscale(3, 2)
upscaler.UpscaleWithColor(3, 2, color.RGBA{172, 25, 135, 255})
upscaler.Render(imageupscaler.JPG, file, nil)
}```
## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.