Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mike10004/sample-image-generator
Java library to generate sample images of arbitrary size
https://github.com/mike10004/sample-image-generator
Last synced: 15 days ago
JSON representation
Java library to generate sample images of arbitrary size
- Host: GitHub
- URL: https://github.com/mike10004/sample-image-generator
- Owner: mike10004
- License: mit
- Created: 2017-06-28T21:32:34.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-04-26T17:20:08.000Z (over 3 years ago)
- Last Synced: 2024-10-07T09:21:06.487Z (3 months ago)
- Language: Java
- Size: 545 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Maven Central](https://img.shields.io/maven-central/v/com.github.mike10004/sample-image-generator.svg)](https://repo1.maven.org/maven2/com/github/mike10004/sample-image-generator/)
[![Travis build status](https://img.shields.io/travis/mike10004/sample-image-generator.svg)](https://travis-ci.org/mike10004/sample-image-generator)
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/2ahqy3e68r5nwm2i?svg=true)](https://ci.appveyor.com/project/mike10004/sample-image-generator)# Sample Image Generator
Java library to generate sample images of arbitrary size.
com.github.mike10004
sample-image-generator
[CHECK MAVEN CENTRAL BADGE ABOVE]
## Usage
Need a 10MB jpeg to load-test your image processing application?
NoiseImageGenerator generator = NoiseImageGenerator.createGenerator(ImageFormat.JPEG);
File imageFile = new File("largeimage.jpg");
try (OutputStream out = new FileOutputStream(imageFile)) {
generator.generate(10 * 1024 * 1024, out);
}Only PNG and JPEG output formats are currently supported.
## Changelog
### 0.4
* fix jpeg write error in Java 11
## Credits
Seed image for the default scaling image generator is from
[publicdomainpictures.net][pdn-image-url]. The author is Jean Beaufort and
it is distributed under the CC0 license.[pdn-image-url]: http://www.publicdomainpictures.net/view-image.php?image=210256&picture=bison