de.digitalcollections.turbojpeg.imageio.TurboJpegImageReadParam Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of imageio-turbojpeg Show documentation
Show all versions of imageio-turbojpeg Show documentation
ImageIO plugin for reading and writing JPEG images via libjpeg-turbo/turbojpeg.
Requires the libjpeg-turbo and turbojpeg shared native libraries to be installed on the system.
package de.digitalcollections.turbojpeg.imageio;
import com.google.common.collect.ImmutableSet;
import javax.imageio.ImageReadParam;
public class TurboJpegImageReadParam extends ImageReadParam {
private int rotationDegree;
public int getRotationDegree() {
return rotationDegree;
}
public void setRotationDegree(int rotationDegree) {
if (!ImmutableSet.of(90, 180, 270).contains(rotationDegree)) {
throw new IllegalArgumentException("Illegal rotation, must be 90, 180 or 270");
}
this.rotationDegree = rotationDegree;
}
}