~hjd/ubuntu/wily/xmlgraphics-commons/debian-merged

« back to all changes in this revision

Viewing changes to src/java/org/apache/xmlgraphics/image/loader/impl/ImageLoaderRawPNG.java

  • Committer: Hans Joachim Desserud
  • Date: 2015-11-11 18:22:53 UTC
  • mfrom: (9.1.5 sid)
  • Revision ID: hans_joachim_desserud-20151111182253-zwi0frfm97j0wddn
  * Merge from Debian unstable.  Remaining changes:
    - d/control: Drop dependencies required for unit testing as they
      include libmockito-java which would pull maven into main, disable unit
      test execution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
import org.apache.xmlgraphics.image.loader.ImageInfo;
39
39
import org.apache.xmlgraphics.image.loader.ImageSessionContext;
40
40
import org.apache.xmlgraphics.image.loader.util.ImageUtil;
 
41
import org.apache.xmlgraphics.io.XmlSourceUtil;
41
42
import org.apache.xmlgraphics.util.MimeConstants;
42
43
 
43
44
public class ImageLoaderRawPNG extends AbstractImageLoader {
44
45
 
45
46
    /** logger */
46
 
    protected static Log log = LogFactory.getLog(ImageLoaderRawPNG.class);
 
47
    protected static final Log log = LogFactory.getLog(ImageLoaderRawPNG.class);
47
48
 
48
49
    /**
49
50
     * Main constructor.
67
68
        Source src = session.needSource(info.getOriginalURI());
68
69
        ImageInputStream in = ImageUtil.needImageInputStream(src);
69
70
        // Remove streams as we do things with them at some later time.
70
 
        ImageUtil.removeStreams(src);
 
71
        XmlSourceUtil.removeStreams(src);
71
72
        SeekableStream seekStream = new ImageInputStreamSeekableStreamAdapter(in);
72
73
        PNGFile im = new PNGFile(seekStream);
73
74
        ImageRawPNG irpng = im.getImageRawPNG(info);