RandomImageGenerator
Random image generator library for Android
Install / Use
/learn @stedi-akk/RandomImageGeneratorREADME
RIG – Random Image Generator
A library for Android that generates random Bitmap images. Generation is performed on the basis of different passed parameters like width, height, type of generator, color palette, etc. Images can be also automatically saved in the requested path with appropriate quality.
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/2.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/1.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/4.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/9.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/5.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/6.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/11.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/8.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/3.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/10.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/7.png" width="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/12.png" width="128">
Usage
Simple example with callback:
new Rig.Builder()
.setGenerator(generator)
.setFixedSize(1920, 1080) // can be also 1x1, 1x1000, etc
.setCount(10)
.setCallback(new GenerateCallback() {
@Override
public void onGenerated(ImageParams imageParams, Bitmap bitmap) {
// will be called 10 times with a new bitmap 1920x1080 on every call
}
@Override
public void onFailedToGenerate(ImageParams imageParams, Exception e) {
// in case if generation failed
}
})
.build()
.generate();
Simple example with compression:
new Rig.Builder()
.setGenerator(generator)
.setFixedSize(1920, 1080) // can be also 666x666, 1337x1337, etc
.setQuality(Quality.jpg(90))
.setFileSavePath(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath())
.setFileSaveCallback(new SaveCallback() {
@Override
public void onSaved(Bitmap bitmap, File file) {
// will be called when bitmap is saved
}
@Override
public void onFailedToSave(Bitmap bitmap, Exception e) {
// in case if compression failed
}
})
.build()
.generate();
For more information, please see Rig.Builder javadoc.
Embed generators
There are currently 6 generators, and 3 effects.
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/FlatColorGenerator/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/FlatColorGenerator/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/FlatColorGenerator/3.png" height="128">
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredPixelsGenerator/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredPixelsGenerator/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredPixelsGenerator/3.png" height="128">
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredRectangleGenerator/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredRectangleGenerator/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredRectangleGenerator/3.png" height="128">
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredNoiseGenerator/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredNoiseGenerator/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredNoiseGenerator/3.png" height="128">
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredCirclesGenerator/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredCirclesGenerator/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredCirclesGenerator/3.png" height="128">
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredLinesGenerator/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredLinesGenerator/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ColoredLinesGenerator/3.png" height="128">
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/MirroredEffect/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/MirroredEffect/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/MirroredEffect/3.png" height="128">
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ThresholdEffect/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ThresholdEffect/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/ThresholdEffect/3.png" height="128">
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/TextOverlayEffect/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/TextOverlayEffect/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/TextOverlayEffect/3.png" height="128">
Custom generators
To create your own generator, you just need to implement Generator interface:
public class MyGenerator implements Generator {
@Override
public Bitmap generate(ImageParams imageParams) throws Exception {
// your generation here
}
}
Color palette
By default, the library generates images with all available HSV colors. RigPalette class is used to change this palette.
Examples:
RigPalette.blackAndWhite()
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/Grayscale/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/Grayscale/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/Grayscale/3.png" height="128">
RigPalette.fromColor(Color.RED)
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/Red/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/Red/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/Red/3.png" height="128">
RigPalette.fromColor(Color.GREEN)
<img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/Green/1.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/Green/2.png" height="128"> <img src="https://github.com/stedi-akk/RandomImageGenerator/raw/master/images/Green/3.png" height="128">
RigPalette.fromColor(Color.BLUE)
<img src="https://github.com/stedi-akk/RandomImageGenerato
Related Skills
healthcheck
347.2kHost security hardening and risk-tolerance configuration for OpenClaw deployments
imsg
347.2kiMessage/SMS CLI for listing chats, history, and sending messages via Messages.app.
xurl
347.2kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
qqbot-channel
347.2kQQ 频道管理技能。查询频道列表、子频道、成员、发帖、公告、日程等操作。使用 qqbot_channel_api 工具代理 QQ 开放平台 HTTP 接口,自动处理 Token 鉴权。当用户需要查看频道、管理子频道、查询成员、发布帖子/公告/日程时使用。
