aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/image/analyser/ImageReaderFactory.java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2008-03-18 15:01:43 +0000
committerVincent Hennebert <vhennebert@apache.org>2008-03-18 15:01:43 +0000
commitbc8128695c25fdeb81f4e15aacc7247200a420d2 (patch)
treef31ced186a0e447b52dadbd6cef177bd095472f7 /src/java/org/apache/fop/image/analyser/ImageReaderFactory.java
parentb0644700fd13beb3286888fbea4dd4a0461d6d54 (diff)
downloadxmlgraphics-fop-bc8128695c25fdeb81f4e15aacc7247200a420d2.tar.gz
xmlgraphics-fop-bc8128695c25fdeb81f4e15aacc7247200a420d2.zip
Merged revisions 636400-636405,636407-638388 via svnmerge from
https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_95 ........ r636403 | vhennebert | 2008-03-12 16:24:48 +0000 (Wed, 12 Mar 2008) | 2 lines Updated copyright years ........ r637075 | vhennebert | 2008-03-14 12:19:45 +0000 (Fri, 14 Mar 2008) | 4 lines Bugzilla #44412: Bugfix: When there was a forced break after a block with (conditional) borders the border-after wasn't painted. Changes made by Jeremias ........ r637119 | jeremias | 2008-03-14 14:41:03 +0000 (Fri, 14 Mar 2008) | 2 lines Bugzilla #44412: Bugfix: The before border of a block is no longer swallowed if its first child issues a break-before. ........ r637791 | jeremias | 2008-03-17 08:59:51 +0000 (Mon, 17 Mar 2008) | 3 lines Removed old image adapters. Removed support for Java 1.3 building as it didn't work anymore anyway. Added a check to require Java 1.4 for building. ........ r637857 | jeremias | 2008-03-17 12:24:33 +0000 (Mon, 17 Mar 2008) | 3 lines Partially reverted revision 637791: Restored JAI as a required dependency for distribution builds (used for error diffusion dithering in the PCL Renderer). It is optional otherwise. Updated the licensing info and release notes to make the changes clear. ........ r637993 | vhennebert | 2008-03-17 17:48:44 +0000 (Mon, 17 Mar 2008) | 3 lines Bugzilla #44621: when the after border of a cell, in the trailing case, is bigger than in the normal case, the generated sequence of Knuth elements was wrong, leading to content being swallowed This is a partial fix only: the content is no longer swallowed, but the penalty is wrong (shorter than it should be). This will lead to the table overflowing the region-body without warning. ........ r638048 | vhennebert | 2008-03-17 20:00:36 +0000 (Mon, 17 Mar 2008) | 2 lines Changed the documentation to reflect the move to Java 1.4 as a minimum requirement ........ r638308 | vhennebert | 2008-03-18 10:26:32 +0000 (Tue, 18 Mar 2008) | 2 lines Simplified the getNextKnuthElements method a little bit ........ r638316 | vhennebert | 2008-03-18 11:06:59 +0000 (Tue, 18 Mar 2008) | 2 lines Removed the 'jdk1.4' suffix appended to the binary artifacts. There's no point in making the distinction anymore since there is only one binary now ........ r638317 | vhennebert | 2008-03-18 11:08:29 +0000 (Tue, 18 Mar 2008) | 2 lines Updated the probable date of the release ........ git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@638396 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/image/analyser/ImageReaderFactory.java')
-rw-r--r--src/java/org/apache/fop/image/analyser/ImageReaderFactory.java108
1 files changed, 0 insertions, 108 deletions
diff --git a/src/java/org/apache/fop/image/analyser/ImageReaderFactory.java b/src/java/org/apache/fop/image/analyser/ImageReaderFactory.java
deleted file mode 100644
index c07d68d39..000000000
--- a/src/java/org/apache/fop/image/analyser/ImageReaderFactory.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.
- */
-
-/* $Id$ */
-
-package org.apache.fop.image.analyser;
-
-// Java
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Iterator;
-import java.util.List;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.fop.apps.FOUserAgent;
-import org.apache.fop.image.FopImage;
-import org.apache.xmlgraphics.util.Service;
-
-/**
- * Factory for ImageReader objects.
- *
- * @author Pankaj Narula
- * @version $Id$
- */
-public class ImageReaderFactory {
-
- private static List formats = new java.util.ArrayList();
-
- /** logger */
- protected static Log log = LogFactory.getLog(ImageReaderFactory.class);
-
- static {
- registerFormat(new JPEGReader());
- registerFormat(new BMPReader());
- registerFormat(new GIFReader());
- registerFormat(new PNGReader());
- registerFormat(new TIFFReader());
- registerFormat(new EPSReader());
- registerFormat(new EMFReader());
-
- //Dynamic registration of ImageReaders
- Iterator iter = Service.providers(ImageReader.class, true);
- while (iter.hasNext()) {
- registerFormat((ImageReader)iter.next());
- }
-
- // the xml parser through batik closes the stream when finished
- // so there is a workaround in the SVGReader
- registerFormat(new SVGReader());
- registerFormat(new SVGZReader());
- registerFormat(new XMLReader());
- }
-
- /**
- * Registers a new ImageReader.
- *
- * @param reader An ImageReader instance
- */
- public static void registerFormat(ImageReader reader) {
- formats.add(reader);
- }
-
- /**
- * ImageReader maker.
- *
- * @param uri URI to the image
- * @param in image input stream
- * @param ua user agent
- * @return An ImageInfo object describing the image
- */
- public static FopImage.ImageInfo make(String uri, InputStream in,
- FOUserAgent ua) {
-
- ImageReader reader;
- try {
- for (int count = 0; count < formats.size(); count++) {
- reader = (ImageReader) formats.get(count);
- FopImage.ImageInfo info = reader.verifySignature(uri, in, ua);
- if (info != null) {
- return info;
- }
- }
- log.warn("No ImageReader found for " + uri);
- in.close();
- } catch (IOException ex) {
- log.error("Error while recovering Image Informations ("
- + uri + ")", ex);
- }
- return null;
- }
-
-}
-