Skip to content

giraone/imaging-kit

Repository files navigation

GitHub license Maven Central GitHub issues GitHub stars Platform

Imaging Kit

A Java JAR for creating thumbnails and/or scaled versions of bitmap images (PNG, JPEG), videos and documents (PDF and Markdown) documents. The concrete solutions are wrapped behind an interface. For bitmap images the implementation is based on plain Java2D. See java2/ProviderJava2D.java.

Hint on thumbnails for videos

This feature is based on ffmpeg. The Java code of this lib will only call an existing ffmpeg binary on the machine. The location has to be defined by setting FFMPEG_BIN, e.g. FFMPEG_BIN=/usr/bin/ffmpeg.

PDF output support

Besides input for thumbnail generation, PDF can also be an output format for Markdown documents. This solution is based on danfickle/openhtmltopdf, which is based on Apache PDFBox, that is already used for the PDF to image (thumbnail) feature.

Integrating

<dependency>
    <groupId>com.giraone.imaging</groupId>
    <artifactId>imaging-kit</artifactId>
    <version>2.0.0</version>
</dependency>

Testing

Test Images

  • There are a few test images and test documents within src/test/resources.

Tests

  • ProviderBitmapImageTest.java - Simple functional tests for bitmap images
  • ProviderPdfTest.java - Simple functional tests for PDF documents
  • DefaultMarkdownProviderTest.java - Simple functional tests for PDF documents
  • JpegScalePerformanceTest.java - A basic performance comparison on the two implementations for bitmap images

Release Notes / Changes

See CHANGELOG.md.

About

A Java lib for creating thumbnails and/or scaled versions of bitmap images (PNG, JPEG) and PDF documents.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors