1 /* 2 * $RCSfile: IDCTCRIF.java,v $ 3 * 4 * Copyright (c) 2005 Sun Microsystems, Inc. All rights reserved. 5 * 6 * Use is subject to license terms. 7 * 8 * $Revision: 1.1 $ 9 * $Date: 2005/02/11 04:56:28 $ 10 * $State: Exp $ 11 */ 12 package com.lightcrafts.media.jai.opimage; 13 import java.awt.RenderingHints; 14 import java.awt.image.RenderedImage; 15 import java.awt.image.renderable.ParameterBlock; 16 import com.lightcrafts.mediax.jai.CRIFImpl; 17 import com.lightcrafts.mediax.jai.ImageLayout; 18 19 /** 20 * A <code>CRIF</code> supporting the "IDCT" operation in the rendered 21 * image layer. 22 * 23 * @since Beta 24 * @see com.lightcrafts.mediax.jai.operator.IDCTDescriptor 25 * 26 */ 27 public class IDCTCRIF extends CRIFImpl { 28 29 /** Constructor. */ IDCTCRIF()30 public IDCTCRIF() { 31 super("idct"); 32 } 33 34 /** 35 * Creates a new instance of an IDCT operator. 36 * 37 * @param paramBlock The scaling type. 38 */ create(ParameterBlock paramBlock, RenderingHints renderHints)39 public RenderedImage create(ParameterBlock paramBlock, 40 RenderingHints renderHints) { 41 // Get ImageLayout from renderHints if any. 42 ImageLayout layout = RIFUtil.getImageLayoutHint(renderHints); 43 44 45 RenderedImage source = paramBlock.getRenderedSource(0); 46 47 return new DCTOpImage(source, renderHints, layout, new FCT(false, 2)); 48 } 49 } 50