mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2026-05-27 00:00:02 -04:00
The code base for raw modules was updated to compile in current environment.
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
<parent>
|
||||
<artifactId>imageio</artifactId>
|
||||
<groupId>com.twelvemonkeys.imageio</groupId>
|
||||
<version>3.1-SNAPSHOT</version>
|
||||
<version>3.4-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
+3
-3
@@ -32,8 +32,8 @@ import com.twelvemonkeys.imageio.ImageReaderBase;
|
||||
import com.twelvemonkeys.imageio.metadata.CompoundDirectory;
|
||||
import com.twelvemonkeys.imageio.metadata.Directory;
|
||||
import com.twelvemonkeys.imageio.metadata.Entry;
|
||||
import com.twelvemonkeys.imageio.metadata.exif.EXIFReader;
|
||||
import com.twelvemonkeys.imageio.metadata.exif.TIFF;
|
||||
import com.twelvemonkeys.imageio.metadata.tiff.TIFF;
|
||||
import com.twelvemonkeys.imageio.metadata.tiff.TIFFReader;
|
||||
import com.twelvemonkeys.imageio.stream.SubImageInputStream;
|
||||
|
||||
import javax.imageio.*;
|
||||
@@ -102,7 +102,7 @@ public final class NEFImageReader extends ImageReaderBase {
|
||||
if (IFDs == null) {
|
||||
imageInput.seek(0);
|
||||
|
||||
IFDs = (CompoundDirectory) new EXIFReader().read(imageInput); // NOTE: Sets byte order as a side effect
|
||||
IFDs = (CompoundDirectory) new TIFFReader().read(imageInput); // NOTE: Sets byte order as a side effect
|
||||
|
||||
// Pull up the sub-ifds now
|
||||
Entry subIFDEntry = IFDs.getEntryById(TIFF.TAG_SUB_IFD);
|
||||
|
||||
+4
-25
@@ -28,12 +28,10 @@
|
||||
|
||||
package com.twelvemonkeys.imageio.plugins.nef;
|
||||
|
||||
import com.twelvemonkeys.imageio.metadata.exif.TIFF;
|
||||
import com.twelvemonkeys.imageio.spi.ProviderInfo;
|
||||
import com.twelvemonkeys.imageio.util.IIOUtil;
|
||||
import com.twelvemonkeys.imageio.metadata.tiff.TIFF;
|
||||
import com.twelvemonkeys.imageio.spi.ImageReaderSpiBase;
|
||||
|
||||
import javax.imageio.ImageReader;
|
||||
import javax.imageio.spi.ImageReaderSpi;
|
||||
import javax.imageio.stream.ImageInputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteOrder;
|
||||
@@ -46,28 +44,9 @@ import java.util.Locale;
|
||||
* @author last modified by $Author: haraldk$
|
||||
* @version $Id: CR2ImageReaderSpi.java,v 1.0 07.04.14 21:26 haraldk Exp$
|
||||
*/
|
||||
public final class NEFImageReaderSpi extends ImageReaderSpi {
|
||||
public final class NEFImageReaderSpi extends ImageReaderSpiBase {
|
||||
public NEFImageReaderSpi() {
|
||||
this(IIOUtil.getProviderInfo(NEFImageReaderSpi.class));
|
||||
}
|
||||
|
||||
private NEFImageReaderSpi(final ProviderInfo pProviderInfo) {
|
||||
super(
|
||||
pProviderInfo.getVendorName(),
|
||||
pProviderInfo.getVersion(),
|
||||
new String[]{"nef", "NEF"},
|
||||
new String[]{"nef"},
|
||||
new String[]{
|
||||
"image/x-nikon-nef", // TODO: Look up
|
||||
},
|
||||
"com.twelvemonkeys.imageio.plugins.nef.NEFImageReader",
|
||||
new Class[] {ImageInputStream.class},
|
||||
null,
|
||||
true, null, null, null, null,
|
||||
true,
|
||||
null, null,
|
||||
null, null
|
||||
);
|
||||
super(new NEFProviderInfo());
|
||||
}
|
||||
|
||||
public boolean canDecodeInput(final Object pSource) throws IOException {
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2018, Oleg Ermolaev
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name "TwelveMonkeys" nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
||||
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package com.twelvemonkeys.imageio.plugins.nef;
|
||||
|
||||
import com.twelvemonkeys.imageio.spi.ReaderWriterProviderInfo;
|
||||
|
||||
/**
|
||||
* @author Oleg Ermolaev Date: 04.05.2018 1:50
|
||||
*/
|
||||
class NEFProviderInfo extends ReaderWriterProviderInfo {
|
||||
protected NEFProviderInfo() {
|
||||
super(
|
||||
NEFProviderInfo.class,
|
||||
new String[]{"nef", "NEF"},
|
||||
new String[]{"nef"},
|
||||
new String[]{
|
||||
"image/x-nikon-nef", // TODO: Look up
|
||||
},
|
||||
"com.twelvemonkeys.imageio.plugins.nef.NEFImageReader",
|
||||
new String[]{"com.twelvemonkeys.imageio.plugins.nef.NEFImageReaderSpi"},
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -28,7 +28,7 @@
|
||||
|
||||
package com.twelvemonkeys.imageio.plugins.nef;
|
||||
|
||||
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTestCase;
|
||||
import com.twelvemonkeys.imageio.util.ImageReaderAbstractTest;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -47,7 +47,7 @@ import java.util.List;
|
||||
* @version $Id: CR2ImageReaderTest.java,v 1.0 07.04.14 21:52 haraldk Exp$
|
||||
*/
|
||||
@Ignore
|
||||
public class NEFImageReaderTest extends ImageReaderAbstractTestCase {
|
||||
public class NEFImageReaderTest extends ImageReaderAbstractTest {
|
||||
@Override
|
||||
protected List<TestData> getTestData() {
|
||||
return Arrays.asList(
|
||||
|
||||
Reference in New Issue
Block a user