Java Image Library

Java Prelim and Studio image library.

Лицензия

Лицензия

Группа

Группа

org.keeber
Идентификатор

Идентификатор

simple-img
Последняя версия

Последняя версия

0.0.6
Дата

Дата

Тип

Тип

jar
Описание

Описание

Java Image Library
Java Prelim and Studio image library.
Ссылка на сайт

Ссылка на сайт

https://github.com/json-k/simple-img
Система контроля версий

Система контроля версий

https://github.com/json-k/simple-img

Скачать simple-img

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.keeber/simple-img/ -->
<dependency>
    <groupId>org.keeber</groupId>
    <artifactId>simple-img</artifactId>
    <version>0.0.6</version>
</dependency>
// https://jarcasting.com/artifacts/org.keeber/simple-img/
implementation 'org.keeber:simple-img:0.0.6'
// https://jarcasting.com/artifacts/org.keeber/simple-img/
implementation ("org.keeber:simple-img:0.0.6")
'org.keeber:simple-img:jar:0.0.6'
<dependency org="org.keeber" name="simple-img" rev="0.0.6">
  <artifact name="simple-img" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.keeber', module='simple-img', version='0.0.6')
)
libraryDependencies += "org.keeber" % "simple-img" % "0.0.6"
[org.keeber/simple-img "0.0.6"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.github.jai-imageio : jai-imageio-core jar 1.4.0

Модули Проекта

Данный проект не имеет модулей.

Simple Image

Simple image is a Java image read / write library.

Philosophy

Reading and writing images should be easy right? Oh, and I need to write the resolution, some XMP etc... BTW I also need to read the custom XMP, you know, like PhotoShop right?

This happens a lot in the Premedia / Studio Imaging industries and for some reason we always assume it will be simple, but in fact, it really isn't. This library wraps some of the java ImageIO and JAI calls and functions into something that can be implemented easily in production.

Maven

The project is available SOON in the Maven Central Repository. For your Gradle build:

	compile 'org.keeber:simple-img:+'

Quickstart

Read an image from an inputstream:

Image img = Image.read.from(new FileInputStream("src/test/resources/images/test.tif")), Image.Type.TIF);

Set the resolution of the image - for later writing to the image:

img.setResolution(300);

Clear the XMP data from the incoming image. Then add our own custom namespace and add a value to it:

XMPMeta m = img.clearXMP();
Image.metadata.registerNS("http://namespace.keeber.org/test", "tst");
m.setProperty("http://namespace.keeber.org/test", "property1", "value1");
//Set some common properties: such as the rating.
m.setProperty(XMPConst.NS_DC, "title", "This is the title.");
m.setProperty(XMPConst.NS_XMP, "Rating", "5");

Save the image as a new type to an output stream:

img.write.to(new FileOutputStream("build/images/test_out.jpg"), Image.Type.JPG);

Do some edits to the raster - here we place the image on a 500px square new image:

img.normalize(false).edit.place(500, 500);

TO-DO

  1. Resolution (reading) for JPEG files, ICC profile (reading) for PNG.
  2. Figure out a prettier way of chaining and doing the edits.
  3. Support for reading and writing CMYK images.

Версии библиотеки

Версия
0.0.6
0.0.5
0.0.4
0.0.3