JPEG CMYK Support for Java

A JPEG reader for Java supporting CMYK color model

License

License

GroupId

GroupId

fr.sertelon.media
ArtifactId

ArtifactId

jpeg-cmyk
Last Version

Last Version

1.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

JPEG CMYK Support for Java
A JPEG reader for Java supporting CMYK color model
Source Code Management

Source Code Management

https://github.com/rsertelon/jpeg-cmyk

Download jpeg-cmyk

How to add to project

<!-- https://jarcasting.com/artifacts/fr.sertelon.media/jpeg-cmyk/ -->
<dependency>
    <groupId>fr.sertelon.media</groupId>
    <artifactId>jpeg-cmyk</artifactId>
    <version>1.1.0</version>
</dependency>
// https://jarcasting.com/artifacts/fr.sertelon.media/jpeg-cmyk/
implementation 'fr.sertelon.media:jpeg-cmyk:1.1.0'
// https://jarcasting.com/artifacts/fr.sertelon.media/jpeg-cmyk/
implementation ("fr.sertelon.media:jpeg-cmyk:1.1.0")
'fr.sertelon.media:jpeg-cmyk:jar:1.1.0'
<dependency org="fr.sertelon.media" name="jpeg-cmyk" rev="1.1.0">
  <artifact name="jpeg-cmyk" type="jar" />
</dependency>
@Grapes(
@Grab(group='fr.sertelon.media', module='jpeg-cmyk', version='1.1.0')
)
libraryDependencies += "fr.sertelon.media" % "jpeg-cmyk" % "1.1.0"
[fr.sertelon.media/jpeg-cmyk "1.1.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.kohsuke.metainf-services : metainf-services jar 1.5
org.slf4j : slf4j-api jar 1.7.7

provided (1)

Group / Artifact Type Version
javax.servlet : servlet-api jar 2.5

Project Modules

There are no modules declared in this project.

JPEG CMYK

This project adds support for JPEG CMYK on the Java platform.

Originally, it was written by Werner Randelshofer. As he decided to license his work under the Creative Commons By 3.0, I wanted to create a Maven artifact for users of this library, and even enhance it a bit.

Usage

Add the dependency to your project:

<dependency>
    <groupId>fr.sertelon.media</groupId>
    <artifactId>jpeg-cmyk</artifactId>
    <version>1.1.0</version>
</dependency>

This will add support for reading CMYK JPEG with Java ImageIO. However, as there are now two JPEG readers you have to read images like so:

// Read an image from a File
BufferedImage imgFromFile = CMYKReader.read(File imageFile);

// Read an image from an ImageInputStream
BufferedImage imgFromImageInputStream = CMYKReader.read(ImageInputStream iis);

// Read an image from an InputStream
BufferedImage imgFromInputStream = CMYKReader.read(InputStream is);

If you want to use this library inside a web application project, you should use the provided ContextListener. It will ensure that the library will be loaded by the JDK.

<?xml version="1.0"?>
<web-app>
	<!-- ... -->
	<listener>
		<listener-class>fr.sertelon.media.IIOProviderContextListener</listener-class>
	</listener>
	<!-- ... -->
</web-app>

Licence

Copyright Werner Randelshofer 2013

This software is licenced under the Creative Commons By 3.0, you can find more information in the LICENSE.md file.

The class fr.sertelon.media.IIOProviderContextListener is licensed under its own terms (see file header) and copyright belongs to Harald Kuhr.

Versions

Version
1.1.0