add JPEG2000 image i/o
This commit is contained in:
parent
b906e7533b
commit
047fee7798
5 changed files with 34 additions and 8 deletions
|
@ -1,3 +1,3 @@
|
||||||
group = org.xbib.graphics
|
group = org.xbib.graphics
|
||||||
name = graphics
|
name = graphics
|
||||||
version = 5.3.4
|
version = 5.3.5
|
||||||
|
|
|
@ -2,6 +2,7 @@ dependencies {
|
||||||
api libs.pdfbox
|
api libs.pdfbox
|
||||||
api project(':graphics-zxing')
|
api project(':graphics-zxing')
|
||||||
runtimeOnly libs.pdfbox.jbig2
|
runtimeOnly libs.pdfbox.jbig2
|
||||||
|
runtimeOnly libs.jai.jpeg2000
|
||||||
testImplementation testLibs.jfreechart
|
testImplementation testLibs.jfreechart
|
||||||
testImplementation project(':graphics-svg')
|
testImplementation project(':graphics-svg')
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,18 +3,19 @@ package org.xbib.graphics.pdfbox.test;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import java.util.logging.Level;
|
import java.util.Collections;
|
||||||
import java.util.logging.Logger;
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
public class JBig2Test {
|
public class JBig2Test {
|
||||||
|
|
||||||
private static final Logger logger = Logger.getLogger(JBig2Test.class.getName());
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void checkPlugins() {
|
public void checkPlugins() {
|
||||||
ImageIO.scanForPlugins();
|
ImageIO.scanForPlugins();
|
||||||
for (String suffix : ImageIO.getReaderFileSuffixes()) {
|
Set<String> set = new LinkedHashSet<>();
|
||||||
logger.log(Level.INFO, "ImageIO suffix: " + suffix);
|
Collections.addAll(set, ImageIO.getReaderFileSuffixes());
|
||||||
}
|
assertTrue(set.contains("jbig2"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
package org.xbib.graphics.pdfbox.test;
|
||||||
|
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import javax.imageio.ImageIO;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||||
|
|
||||||
|
public class JPEG2000Test {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void checkPlugins() {
|
||||||
|
ImageIO.scanForPlugins();
|
||||||
|
Set<String> set = new LinkedHashSet<>();
|
||||||
|
Collections.addAll(set, ImageIO.getReaderFileSuffixes());
|
||||||
|
assertTrue(set.contains("jp2"));
|
||||||
|
}
|
||||||
|
}
|
|
@ -23,6 +23,7 @@ dependencyResolutionManagement {
|
||||||
library('jna', 'net.java.dev.jna', 'jna').version('5.14.0')
|
library('jna', 'net.java.dev.jna', 'jna').version('5.14.0')
|
||||||
library('pdfbox', 'org.apache.pdfbox', 'pdfbox').version('4.0.0-SNAPSHOT')
|
library('pdfbox', 'org.apache.pdfbox', 'pdfbox').version('4.0.0-SNAPSHOT')
|
||||||
library('pdfbox.jbig2', 'org.apache.pdfbox', 'jbig2-imageio').version('3.0.4')
|
library('pdfbox.jbig2', 'org.apache.pdfbox', 'jbig2-imageio').version('3.0.4')
|
||||||
|
library('jai-jpeg2000', 'com.github.jai-imageio', 'jai-imageio-jpeg2000').version('1.4.0')
|
||||||
library('datastructures-settings', 'org.xbib', 'settings-datastructures').versionRef('datastructures')
|
library('datastructures-settings', 'org.xbib', 'settings-datastructures').versionRef('datastructures')
|
||||||
library('datastructures-settings-json', 'org.xbib', 'settings-datastructures-json').versionRef('datastructures')
|
library('datastructures-settings-json', 'org.xbib', 'settings-datastructures-json').versionRef('datastructures')
|
||||||
library('datastructures-settings-yaml', 'org.xbib', 'settings-datastructures-yaml').versionRef('datastructures')
|
library('datastructures-settings-yaml', 'org.xbib', 'settings-datastructures-yaml').versionRef('datastructures')
|
||||||
|
|
Loading…
Reference in a new issue