01: /*
02: * $RCSfile: DCTCRIF.java,v $
03: *
04: * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved.
05: *
06: * Use is subject to license terms.
07: *
08: * $Revision: 1.1 $
09: * $Date: 2005/02/11 04:56:21 $
10: * $State: Exp $
11: */
12: package com.sun.media.jai.opimage;
13:
14: import java.awt.RenderingHints;
15: import java.awt.image.RenderedImage;
16: import java.awt.image.renderable.ParameterBlock;
17: import java.awt.image.renderable.RenderedImageFactory;
18: import javax.media.jai.CRIFImpl;
19: import javax.media.jai.ImageLayout;
20: import java.util.Map;
21:
22: /**
23: * A <code>CRIF</code> supporting the "DCT" operation in the rendered
24: * image layer.
25: *
26: * @since Beta
27: * @see javax.media.jai.operator.DCTDescriptor
28: *
29: */
30: public class DCTCRIF extends CRIFImpl {
31:
32: /** Constructor. */
33: public DCTCRIF() {
34: super ("dct");
35: }
36:
37: /**
38: * Creates a new instance of a DCT operator.
39: *
40: * @param paramBlock The scaling type.
41: */
42: public RenderedImage create(ParameterBlock paramBlock,
43: RenderingHints renderHints) {
44: // Get ImageLayout from renderHints if any.
45: ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints);
46:
47: RenderedImage source = paramBlock.getRenderedSource(0);
48:
49: return new DCTOpImage(source, renderHints, layout, new FCT(
50: true, 2));
51: }
52: }
|