Dummy Image Generator allows you to dynamically create and return images of various sizes, colors and styles, providing flexible customization of image generation through a simple and user-friendly URL interface.
Built with Go 1.21.4
- Executable file
- Config
config.yaml - Fonts
arial.ttf - Resources
favicon.ico - Static
cssimgjs - Views
index.html
- server
- addr
host:port
- addr
- image
- default_format
image format - size
- min_size
size format - max_size
size format - size_clamp
bool
- min_size
- color
- default_background_color
color format - default_text_color
color format
- default_background_color
- default_format
go mod download
go build -ldflags="-s -w" -o http_server.exe cmd\http_server\main.go
.\http_server.exe
Example for Windows
/ size / background_color / text_color / format ? text
-
Size:
100x100100HDand other...Required
-
Color:
FFFFFFFFFFFF255,255,255Whiteand other...Default: background is
Blacktext isWhite -
Text:
Hello worldno_textDefault:
width x height -
Image:
PNGJPEGWEBPGIFSVGDefault:
PNG
- Min size:
10x10 - Max size:
2000x2000
Automatic size clamp
Examples
http://127.0.0.1:8080/800x800/FFF/000/gif?text=Hello%20world
size, background_color, text_color, format, text
http://127.0.0.1:8080/HD/F1E2D3/webp?text=Hello%20world
size, background_color, format, text
http://127.0.0.1:8080/400
size
| Name | Module | Version |
|---|---|---|
| gin | github.com/gin-gonic/gin | 1.9.1 |
| viper | github.com/spf13/viper | 1.17.0 |
| logrus | github.com/sirupsen/logrus | 1.9.3 |
| gg | github.com/fogleman/gg | 1.3.0 |
| webp | github.com/chai2010/webp | 1.1.1 |
| svgo | github.com/ajstarks/svgo | 0.0.0 |