๐ผ๏ธ Dummy Image Generator
What is this
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
๐๏ธ Project
Structure
- Executable file
- Config
config.yaml
- Fonts
arial.ttf
- Resources
favicon.ico
- Static
css
img
js
- Views
index.html
Config
- server
- image
- default_format
image format
- size
- min_size
size format
- max_size
size format
- size_clamp
bool
- color
- default_background_color
color format
- default_text_color
color format
Build and run
go mod download
go build -ldflags="-s -w" -o http_server.exe cmd\http_server\main.go
.\http_server.exe
Example for Windows
๐ URL
/ size
/ background_color
/ text_color
/ format
? text
-
Size: 100x100
100
HD
and other...
Required
-
Color: F
FF
FFF
FFFFFF
255,255,255
White
and other...
Default: background is Black
text is White
-
Text: Hello world
no_text
Default: width x height
-
Image: PNG
JPEG
WEBP
GIF
SVG
Default: PNG
Limits
- 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
๐ฆ Libraries