~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/ImageConverterBuffered2Rendered.java

  • Committer: Bazaar Package Importer
  • Author(s): Vincent Fourmond
  • Date: 2011-02-11 14:15:14 UTC
  • mfrom: (8.1.2 experimental)
  • Revision ID: james.westby@ubuntu.com-20110211141514-h67achft6x31gju1
Tags: 1.4.dfsg-3
Uploading to unstable, hoping we won't break too many things ;-)...

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
6
 * (the "License"); you may not use this file except in compliance with
7
7
 * the License.  You may obtain a copy of the License at
8
 
 * 
 
8
 *
9
9
 *      http://www.apache.org/licenses/LICENSE-2.0
10
 
 * 
 
10
 *
11
11
 * Unless required by applicable law or agreed to in writing, software
12
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
 * limitations under the License.
16
16
 */
17
17
 
18
 
/* $Id: ImageConverterBuffered2Rendered.java 606580 2007-12-23 17:45:02Z jeremias $ */
19
 
 
 
18
/* $Id: ImageConverterBuffered2Rendered.java 798806 2009-07-29 08:11:13Z maxberger $ */
 
19
 
20
20
package org.apache.xmlgraphics.image.loader.impl;
21
21
 
22
22
import java.util.Map;
34
34
    public Image convert(Image src, Map hints) {
35
35
        checkSourceFlavor(src);
36
36
        ImageBuffered buffered = (ImageBuffered)src;
37
 
        return new ImageRendered(buffered.getInfo(), buffered.getRenderedImage(), null);
 
37
        return new ImageRendered(buffered.getInfo(), buffered
 
38
                .getRenderedImage(), buffered.getTransparentColor());
38
39
    }
39
40
 
40
41
    /** {@inheritDoc} */
51
52
    public int getConversionPenalty() {
52
53
        return NO_CONVERSION_PENALTY;
53
54
    }
54
 
    
 
55
 
55
56
}