Skip to content

Simple library built off processing to support more image types and allow accurate collision detection between images.

License

Notifications You must be signed in to change notification settings

kchandra423/KImages

Repository files navigation

CircleCI

KImages

Overview

This library is built off of processing and creates some added functionality. While the functionality presented is mostly suited for a game, there is a large number of different things in processing this would be used for. Some notable features include:

  • Supports a wider range of file types (Everything supported by Java Advanced Imaging)
  • Images with basic physics and transformation capabilities
  • Adds precision collision detection between images

Images

File support

As stated previously a much wider range of image types are supported by using Java Advanced Imaging). Most notably, are gifs. While processing already technically supports gifs, they aren't animated and just appear like this:

Static

But this library animates the gif to look like this (with the help of Open-Imaging):

Animated

Resizing

This library uses Scalr to resize images, as opposed to processing's regular resize methods. This gives more control for how images should be scaled, as well as better quality and speed. Most questions about how resizes are done can probably be answered with a quick look at the documentation of Scalr.

Transformations

The MovableKImage class provides several way of performing basic transformation on images, including translation, rotations, and reflection Reflected

Collision detection

Collision detection between Images is done through the KCollider class. Collision accuracy can be modified, with up to pixel perfect precision, though this can be very slow.

Download

This project can be downloaded from the releases section of it's github page, or downloaded directly from the dist folder

Documentation

Javadocs for this project are available in the docs folder are online on the GitHub pages for this repo