You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by da...@apache.org on 2011/04/04 20:48:23 UTC

svn commit: r1088714 - in /commons/proper/sanselan/trunk/src: main/java/org/apache/sanselan/ main/java/org/apache/sanselan/formats/dcx/ test/data/images/dcx/ test/data/images/dcx/1/ test/java/org/apache/sanselan/common/byteSources/ test/java/org/apache...

Author: damjan
Date: Mon Apr  4 18:48:23 2011
New Revision: 1088714

URL: http://svn.apache.org/viewvc?rev=1088714&view=rev
Log:
Added support for the DCX image format, and some tests.

Added:
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/dcx/
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/dcx/DcxImageParser.java   (with props)
    commons/proper/sanselan/trunk/src/test/data/images/dcx/
    commons/proper/sanselan/trunk/src/test/data/images/dcx/1/
    commons/proper/sanselan/trunk/src/test/data/images/dcx/1/Oregon Scientific DS6639 - DSC_0307 - small.dcx   (with props)
    commons/proper/sanselan/trunk/src/test/data/images/dcx/1/info.txt   (with props)
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxBaseTest.java   (with props)
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxReadTest.java   (with props)
Modified:
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageFormat.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageParser.java
    commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/Sanselan.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java
    commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageFormat.java?rev=1088714&r1=1088713&r2=1088714&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageFormat.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageFormat.java Mon Apr  4 18:48:23 2011
@@ -75,6 +75,7 @@ public class ImageFormat
     public static final ImageFormat IMAGE_FORMAT_ICNS = new ImageFormat("ICNS");
     public static final ImageFormat IMAGE_FORMAT_WBMP = new ImageFormat("WBMP");
     public static final ImageFormat IMAGE_FORMAT_PCX = new ImageFormat("PCX");
+    public static final ImageFormat IMAGE_FORMAT_DCX = new ImageFormat("DCX");
 
     public static final ImageFormat[] getAllFormats()
     {
@@ -84,7 +85,7 @@ public class ImageFormat
                 IMAGE_FORMAT_PSD, IMAGE_FORMAT_PBM, IMAGE_FORMAT_PGM,
                 IMAGE_FORMAT_PPM, IMAGE_FORMAT_PNM, IMAGE_FORMAT_TGA,
                 IMAGE_FORMAT_JBIG2, IMAGE_FORMAT_ICNS, IMAGE_FORMAT_WBMP,
-                IMAGE_FORMAT_PCX,
+                IMAGE_FORMAT_PCX, IMAGE_FORMAT_DCX,
         };
 
         return result;

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageParser.java?rev=1088714&r1=1088713&r2=1088714&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageParser.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/ImageParser.java Mon Apr  4 18:48:23 2011
@@ -34,6 +34,7 @@ import org.apache.sanselan.common.byteSo
 import org.apache.sanselan.common.byteSources.ByteSourceArray;
 import org.apache.sanselan.common.byteSources.ByteSourceFile;
 import org.apache.sanselan.formats.bmp.BmpImageParser;
+import org.apache.sanselan.formats.dcx.DcxImageParser;
 import org.apache.sanselan.formats.gif.GifImageParser;
 import org.apache.sanselan.formats.icns.IcnsImageParser;
 import org.apache.sanselan.formats.ico.IcoImageParser;
@@ -57,7 +58,7 @@ public abstract class ImageParser extend
                 new GifImageParser(), new PsdImageParser(),
                 new PNMImageParser(), new IcoImageParser(),
                 new IcnsImageParser(), new WbmpImageParser(),
-                new PcxImageParser(),
+                new PcxImageParser(), new DcxImageParser(),
         // new JBig2ImageParser(),
         // new TgaImageParser(),
         };

Modified: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/Sanselan.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/Sanselan.java?rev=1088714&r1=1088713&r2=1088714&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/Sanselan.java (original)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/Sanselan.java Mon Apr  4 18:48:23 2011
@@ -149,7 +149,8 @@ public abstract class Sanselan implement
     private static final int[] MAGIC_NUMBERS_PPM_B = { 0x50, 0x36, };
     private static final int[] MAGIC_NUMBERS_JBIG2_1 = { 0x97, 0x4A, };
     private static final int[] MAGIC_NUMBERS_JBIG2_2 = { 0x42, 0x32, };
-	private static final int[] MAGIC_NUMBERS_ICNS = { 0x69, 0x63, };
+    private static final int[] MAGIC_NUMBERS_ICNS = { 0x69, 0x63, };
+    private static final int[] MAGIC_NUMBERS_DCX = {0xB1, 0x68,};
 
     private static boolean compareBytePair(int[] a, int b[]) {
         if (a.length != 2 && b.length != 2) {
@@ -219,8 +220,10 @@ public abstract class Sanselan implement
                 if (compareBytePair(MAGIC_NUMBERS_JBIG2_2, bytePair2)) {
                     return ImageFormat.IMAGE_FORMAT_JBIG2;
                 }
-			} else if (compareBytePair(MAGIC_NUMBERS_ICNS, bytePair)) {
-				return ImageFormat.IMAGE_FORMAT_ICNS;
+            } else if (compareBytePair(MAGIC_NUMBERS_ICNS, bytePair)) {
+                return ImageFormat.IMAGE_FORMAT_ICNS;
+            } else if (compareBytePair(MAGIC_NUMBERS_DCX, bytePair)) {
+                return ImageFormat.IMAGE_FORMAT_DCX;
             }
 
             return ImageFormat.IMAGE_FORMAT_UNKNOWN;

Added: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/dcx/DcxImageParser.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/dcx/DcxImageParser.java?rev=1088714&view=auto
==============================================================================
--- commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/dcx/DcxImageParser.java (added)
+++ commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/dcx/DcxImageParser.java Mon Apr  4 18:48:23 2011
@@ -0,0 +1,277 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.sanselan.formats.dcx;
+
+import java.awt.Dimension;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.sanselan.ImageFormat;
+import org.apache.sanselan.ImageInfo;
+import org.apache.sanselan.ImageParser;
+import org.apache.sanselan.ImageReadException;
+import org.apache.sanselan.ImageWriteException;
+import org.apache.sanselan.common.BinaryOutputStream;
+import org.apache.sanselan.common.IImageMetadata;
+import org.apache.sanselan.common.byteSources.ByteSource;
+import org.apache.sanselan.common.byteSources.ByteSourceInputStream;
+import org.apache.sanselan.formats.pcx.PcxConstants;
+import org.apache.sanselan.formats.pcx.PcxImageParser;
+
+public class DcxImageParser extends ImageParser
+{
+    // See http://www.fileformat.info/format/pcx/egff.htm for documentation
+
+    public DcxImageParser()
+    {
+        super.setByteOrder(BYTE_ORDER_LSB);
+    }
+
+    public String getName()
+    {
+        return "Dcx-Custom";
+    }
+
+    public String getDefaultExtension()
+    {
+        return DEFAULT_EXTENSION;
+    }
+    private static final String DEFAULT_EXTENSION = ".dcx";
+    private static final String ACCEPTED_EXTENSIONS[] =
+    {
+        ".dcx",
+    };
+
+    protected String[] getAcceptedExtensions()
+    {
+        return ACCEPTED_EXTENSIONS;
+    }
+
+    protected ImageFormat[] getAcceptedTypes()
+    {
+        return new ImageFormat[]
+        {
+            ImageFormat.IMAGE_FORMAT_DCX, //
+        };
+    }
+
+    public boolean embedICCProfile(File src, File dst, byte profile[])
+    {
+        return false;
+    }
+
+    public IImageMetadata getMetadata(ByteSource byteSource, Map params)
+            throws ImageReadException, IOException
+    {
+        return null;
+    }
+
+    public ImageInfo getImageInfo(ByteSource byteSource, Map params)
+            throws ImageReadException, IOException
+    {
+        return null;
+    }
+
+    public Dimension getImageSize(ByteSource byteSource,
+            Map params)
+            throws ImageReadException, IOException
+    {
+        return null;
+    }
+
+    public byte[] getICCProfileBytes(ByteSource byteSource,
+            Map params)
+            throws ImageReadException, IOException
+    {
+        return null;
+    }
+
+    private static class DcxHeader
+    {
+
+        public static final int DCX_ID = 0x3ADE68B1;
+        public final int id;
+        public final int[] pageTable;
+
+        public DcxHeader(final int id,
+                int[] pageTable)
+        {
+            this.id = id;
+            this.pageTable = pageTable;
+        }
+
+        public void dump(PrintWriter pw)
+        {
+            pw.println("DcxHeader");
+            pw.println("Id: 0x" + Integer.toHexString(id));
+            pw.println("Pages: " + pageTable.length);
+            pw.println();
+        }
+    }
+
+    private DcxHeader readDcxHeader(ByteSource byteSource)
+            throws ImageReadException, IOException
+    {
+        InputStream is = null;
+        try
+        {
+            is = byteSource.getInputStream();
+            int id = read4Bytes("Id", is, "Not a Valid DCX File");
+            ArrayList pageTable = new ArrayList(1024);
+            for (int i = 0; i < 1024; i++)
+            {
+                int pageOffset = read4Bytes("PageTable", is, "Not a Valid DCX File");
+                if (pageOffset == 0)
+                    break;
+                pageTable.add(new Integer(pageOffset));
+            }
+
+            if (id != DcxHeader.DCX_ID)
+                throw new ImageReadException("Not a Valid DCX File: file id incorrect");
+            if (pageTable.size() == 1024)
+                throw new ImageReadException("DCX page table not terminated by zero entry");
+            
+            Object[] objects = pageTable.toArray();
+            int[] pages = new int[objects.length];
+            for (int i = 0; i < objects.length; i++)
+                pages[i] = ((Integer) objects[i]).intValue();
+
+            return new DcxHeader(id, pages);
+        }
+        finally
+        {
+            try
+            {
+                if (is != null)
+                {
+                    is.close();
+                }
+            }
+            catch (IOException ignored)
+            {
+            }
+        }
+    }
+
+    public boolean dumpImageFile(PrintWriter pw, ByteSource byteSource)
+            throws ImageReadException, IOException
+    {
+        readDcxHeader(byteSource).dump(pw);
+        return true;
+    }
+
+    public final BufferedImage getBufferedImage(ByteSource byteSource,
+            Map params) throws ImageReadException, IOException
+    {
+        ArrayList list = getAllBufferedImages(byteSource);
+        if (list.isEmpty())
+            return null;
+        return (BufferedImage) list.get(0);
+    }
+
+    public ArrayList getAllBufferedImages(ByteSource byteSource)
+            throws ImageReadException, IOException
+    {
+        DcxHeader dcxHeader = readDcxHeader(byteSource);
+        ArrayList images = new ArrayList();
+        PcxImageParser pcxImageParser = new PcxImageParser();
+        for (int i = 0; i < dcxHeader.pageTable.length; i++)
+        {
+            InputStream stream = null;
+            try
+            {
+                stream = byteSource.getInputStream(dcxHeader.pageTable[i]);
+                ByteSourceInputStream pcxSource = new ByteSourceInputStream(stream, null);
+                BufferedImage image = pcxImageParser.getBufferedImage(pcxSource, new HashMap());
+                images.add(image);
+            }
+            finally
+            {
+                try
+                {
+                    if (stream != null)
+                        stream.close();
+                }
+                catch (IOException ignored)
+                {
+                }
+            }
+        }
+        return images;
+    }
+
+    public void writeImage(BufferedImage src, OutputStream os, Map params)
+            throws ImageWriteException, IOException
+    {
+        // make copy of params; we'll clear keys as we consume them.
+        params = (params == null) ? new HashMap() : new HashMap(params);
+
+        HashMap pcxParams = new HashMap();
+
+        // clear format key.
+        if (params.containsKey(PARAM_KEY_FORMAT))
+        {
+            params.remove(PARAM_KEY_FORMAT);
+        }
+
+        if (params.containsKey(PcxConstants.PARAM_KEY_PCX_COMPRESSION))
+        {
+            Object value = params.remove(PcxConstants.PARAM_KEY_PCX_COMPRESSION);
+            pcxParams.put(PcxConstants.PARAM_KEY_PCX_COMPRESSION, value);
+        }
+
+        if (params.size() > 0)
+        {
+            Object firstKey = params.keySet().iterator().next();
+            throw new ImageWriteException("Unknown parameter: " + firstKey);
+        }
+
+        final int headerSize = 4 + 1024 * 4;
+
+        BinaryOutputStream bos = new BinaryOutputStream(os, BinaryOutputStream.BYTE_ORDER_LITTLE_ENDIAN);
+        bos.write4Bytes(DcxHeader.DCX_ID);
+        // Some apps may need a full 1024 entry table
+        bos.write4Bytes(headerSize);
+        for (int i = 0; i < 1023; i++)
+            bos.write4Bytes(0);
+        PcxImageParser pcxImageParser = new PcxImageParser();
+        pcxImageParser.writeImage(src, bos, pcxParams);
+    }
+
+    /**
+     * Extracts embedded XML metadata as XML string.
+     * <p>
+     *
+     * @param byteSource
+     *            File containing image data.
+     * @param params
+     *            Map of optional parameters, defined in SanselanConstants.
+     * @return Xmp Xml as String, if present.  Otherwise, returns null.
+     */
+    public String getXmpXml(ByteSource byteSource, Map params)
+            throws ImageReadException, IOException
+    {
+        return null;
+    }
+}

Propchange: commons/proper/sanselan/trunk/src/main/java/org/apache/sanselan/formats/dcx/DcxImageParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/sanselan/trunk/src/test/data/images/dcx/1/Oregon Scientific DS6639 - DSC_0307 - small.dcx
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/data/images/dcx/1/Oregon%20Scientific%20DS6639%20-%20DSC_0307%20-%20small.dcx?rev=1088714&view=auto
==============================================================================
Binary file - no diff available.

Propchange: commons/proper/sanselan/trunk/src/test/data/images/dcx/1/Oregon Scientific DS6639 - DSC_0307 - small.dcx
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: commons/proper/sanselan/trunk/src/test/data/images/dcx/1/info.txt
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/data/images/dcx/1/info.txt?rev=1088714&view=auto
==============================================================================
--- commons/proper/sanselan/trunk/src/test/data/images/dcx/1/info.txt (added)
+++ commons/proper/sanselan/trunk/src/test/data/images/dcx/1/info.txt Mon Apr  4 18:48:23 2011
@@ -0,0 +1,2 @@
+Contributed to the project by Damjan Jovanovic
+Converted from ../../bmp/1/Oregon Scientific DS6639 - DSC_0307 - small.bmp

Propchange: commons/proper/sanselan/trunk/src/test/data/images/dcx/1/info.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java?rev=1088714&r1=1088713&r2=1088714&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java (original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/common/byteSources/ByteSourceImageTest.java Mon Apr  4 18:48:23 2011
@@ -60,6 +60,7 @@ public class ByteSourceImageTest extends
                     || imageFile.getName().toLowerCase().endsWith(".tga")
                     || imageFile.getName().toLowerCase().endsWith(".jb2")
                     || imageFile.getName().toLowerCase().endsWith(".pcx")
+                    || imageFile.getName().toLowerCase().endsWith(".dcx")
                     || imageFile.getName().toLowerCase().endsWith(".psd")
                     || imageFile.getName().toLowerCase().endsWith(".wbmp"))
             {

Added: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxBaseTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxBaseTest.java?rev=1088714&view=auto
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxBaseTest.java (added)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxBaseTest.java Mon Apr  4 18:48:23 2011
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.sanselan.formats.dcx;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+import org.apache.sanselan.ImageFormat;
+import org.apache.sanselan.ImageReadException;
+import org.apache.sanselan.Sanselan;
+import org.apache.sanselan.SanselanTest;
+
+public abstract class DcxBaseTest extends SanselanTest
+{
+
+    private static boolean isDcx(File file) throws IOException, ImageReadException
+    {
+        ImageFormat format = Sanselan.guessFormat(file);
+        return format == ImageFormat.IMAGE_FORMAT_DCX;
+    }
+
+    private static final ImageFilter IMAGE_FILTER = new ImageFilter() {
+        public boolean accept(File file) throws IOException, ImageReadException
+        {
+            return isDcx(file);
+        }
+    };
+
+    protected List getDcxImages() throws IOException, ImageReadException
+    {
+        return getTestImages(IMAGE_FILTER);
+    }
+}

Propchange: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxBaseTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxReadTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxReadTest.java?rev=1088714&view=auto
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxReadTest.java (added)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxReadTest.java Mon Apr  4 18:48:23 2011
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.sanselan.formats.dcx;
+
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.sanselan.ImageInfo;
+import org.apache.sanselan.ImageReadException;
+import org.apache.sanselan.Sanselan;
+import org.apache.sanselan.common.IImageMetadata;
+import org.apache.sanselan.util.Debug;
+
+public class DcxReadTest extends DcxBaseTest
+{
+
+    public void test() throws IOException, ImageReadException
+    {
+        Debug.debug("start");
+
+        List images = getDcxImages();
+        for (int i = 0; i < images.size(); i++)
+        {
+            if (i % 10 == 0)
+                Debug.purgeMemory();
+
+            File imageFile = (File) images.get(i);
+            Debug.debug("imageFile", imageFile);
+
+            IImageMetadata metadata = Sanselan.getMetadata(imageFile);
+            // assertNotNull(metadata);
+
+            Map params = new HashMap();
+            ImageInfo imageInfo = Sanselan.getImageInfo(imageFile, params);
+            //assertNotNull(imageInfo);
+
+            BufferedImage image = Sanselan.getBufferedImage(imageFile);
+            assertNotNull(image);
+        }
+    }
+
+}

Propchange: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/formats/dcx/DcxReadTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java
URL: http://svn.apache.org/viewvc/commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java?rev=1088714&r1=1088713&r2=1088714&view=diff
==============================================================================
--- commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java (original)
+++ commons/proper/sanselan/trunk/src/test/java/org/apache/sanselan/roundtrip/RoundtripTest.java Mon Apr  4 18:48:23 2011
@@ -90,6 +90,8 @@ public class RoundtripTest extends Sanse
                     COLOR_BITMAP, true), //
             new FormatInfo(ImageFormat.IMAGE_FORMAT_PCX, true, true,
                     COLOR_FULL_RGB, true), //
+            new FormatInfo(ImageFormat.IMAGE_FORMAT_DCX, true, true,
+                    COLOR_FULL_RGB, true), //
     };
 
     private BufferedImage createArgbBitmapImage(int width, int height)