sample-image-generator

Library that generates sample images of arbitrary size

License

License

GroupId

GroupId

com.github.mike10004
ArtifactId

ArtifactId

sample-image-generator
Last Version

Last Version

0.4
Release Date

Release Date

Type

Type

jar
Description

Description

sample-image-generator
Library that generates sample images of arbitrary size
Project URL

Project URL

https://github.com/mike10004/sample-image-generator
Source Code Management

Source Code Management

https://github.com/mike10004/sample-image-generator

Download sample-image-generator

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.mike10004/sample-image-generator/ -->
<dependency>
    <groupId>com.github.mike10004</groupId>
    <artifactId>sample-image-generator</artifactId>
    <version>0.4</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.mike10004/sample-image-generator/
implementation 'com.github.mike10004:sample-image-generator:0.4'
// https://jarcasting.com/artifacts/com.github.mike10004/sample-image-generator/
implementation ("com.github.mike10004:sample-image-generator:0.4")
'com.github.mike10004:sample-image-generator:jar:0.4'
<dependency org="com.github.mike10004" name="sample-image-generator" rev="0.4">
  <artifact name="sample-image-generator" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.mike10004', module='sample-image-generator', version='0.4')
)
libraryDependencies += "com.github.mike10004" % "sample-image-generator" % "0.4"
[com.github.mike10004/sample-image-generator "0.4"]

Dependencies

compile (3)

Group / Artifact Type Version
org.devlib.schmidt : imageinfo jar 1.9
org.apache.commons : commons-math3 jar 3.6.1
commons-io : commons-io jar 2.5

test (2)

Group / Artifact Type Version
com.google.guava : guava jar 23.0
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Maven Central Travis build status AppVeyor build status

Sample Image Generator

Java library to generate sample images of arbitrary size.

<dependency>
    <groupId>com.github.mike10004</groupId>
    <artifactId>sample-image-generator</artifactId>
    <version>[CHECK MAVEN CENTRAL BADGE ABOVE]</version>
</dependency>

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. The author is Jean Beaufort and it is distributed under the CC0 license.

Versions

Version
0.4
0.3
0.1