当前位置: 首页>>代码示例>>Java>>正文


Java Interpolation.getSubsampleBitsH方法代码示例

本文整理汇总了Java中javax.media.jai.Interpolation.getSubsampleBitsH方法的典型用法代码示例。如果您正苦于以下问题:Java Interpolation.getSubsampleBitsH方法的具体用法?Java Interpolation.getSubsampleBitsH怎么用?Java Interpolation.getSubsampleBitsH使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.media.jai.Interpolation的用法示例。


在下文中一共展示了Interpolation.getSubsampleBitsH方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: AffineBicubic2OpImage

import javax.media.jai.Interpolation; //导入方法依赖的package包/类
/**
 * Constructs an AffineBicubic2OpImage from a RenderedImage source,
 *
 * @param source a RenderedImage.
 * @param extender a BorderExtender, or null.
 * @param layout an ImageLayout optionally containing the tile grid layout,
 *        SampleModel, and ColorModel, or null.
 * @param interp an Interpolation object to use for resampling
 * @param transform the desired AffineTransform.
 */
public AffineBicubic2OpImage(RenderedImage source,
                             BorderExtender extender,
                             Map config,
                             ImageLayout layout,
                             AffineTransform transform,
                             Interpolation interp,
                             double[] backgroundValues) {
    super(source,
          extender,
          config,
          layout,
          transform,
          interp,
          backgroundValues);

    subsampleBits = interp.getSubsampleBitsH();
    shiftvalue = 1 << subsampleBits;
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:29,代码来源:AffineBicubic2OpImage.java

示例2: AffineGeneralOpImage

import javax.media.jai.Interpolation; //导入方法依赖的package包/类
/**
 * Constructs an AffineGeneralOpImage from a RenderedImage source,
 *
 * @param source a RenderedImage.
 * @param extender a BorderExtender, or null.

 * @param layout an ImageLayout optionally containing the tile grid layout,
 *        SampleModel, and ColorModel, or null.
 * @param interp an Interpolation object to use for resampling
 * @param transform the desired AffineTransform.
 */
public AffineGeneralOpImage(RenderedImage source,
                            BorderExtender extender,
                            Map config,
                            ImageLayout layout,
                            AffineTransform transform,
                            Interpolation interp,
double[] backgroundValues) {
    super(source,
          extender,
          config,
          layout,
          transform,
          interp,
   backgroundValues);

    subsampleBits = interp.getSubsampleBitsH();
    shiftvalue = 1 << subsampleBits;

    interp_width = interp.getWidth();
    interp_height = interp.getHeight();
    interp_left = interp.getLeftPadding();
    interp_top = interp.getTopPadding();
    interp_right = interp_width - interp_left - 1;
    interp_bottom = interp_height - interp_top - 1;
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:37,代码来源:AffineGeneralOpImage.java

示例3: ScaleBilinearOpImage

import javax.media.jai.Interpolation; //导入方法依赖的package包/类
/**
    * Constructs a ScaleBilinearOpImage from a RenderedImage source,
    * 
    * @param source a RenderedImage.
    * @param extender a BorderExtender, or null.
    * @param layout an ImageLayout optionally containing the tile grid layout,
    *        SampleModel, and ColorModel, or null.
    * @param xScale scale factor along x axis.
    * @param yScale scale factor along y axis.
    * @param xTrans translation factor along x axis.
    * @param yTrans translation factor along y axis.
    * @param interp a Interpolation object to use for resampling.
    */
   public ScaleBilinearOpImage(RenderedImage source,
                               BorderExtender extender,
                               Map config,
                               ImageLayout layout,
                               float xScale,
                               float yScale,
                               float xTrans,
                               float yTrans,
                               Interpolation interp) {
       super(source,
             layout,
             config,
             true,
             extender,
             interp,
             xScale,
             yScale,
             xTrans,
             yTrans);

subsampleBits = interp.getSubsampleBitsH();

// Number of subsampling positions
one = 1 << subsampleBits;

// Subsampling related variables
shift2 = 2 * subsampleBits;
round2 = 1 << (shift2 - 1);

if (invScaleYRational.num > invScaleYRational.denom) {
    invScaleYInt = invScaleYRational.num / invScaleYRational.denom;
    invScaleYFrac = invScaleYRational.num % invScaleYRational.denom;
} else {
    invScaleYInt = 0;
    invScaleYFrac = invScaleYRational.num;
}

if (invScaleXRational.num > invScaleXRational.denom) {
    invScaleXInt = invScaleXRational.num / invScaleXRational.denom;
    invScaleXFrac = invScaleXRational.num % invScaleXRational.denom;
} else {
    invScaleXInt = 0;
    invScaleXFrac = invScaleXRational.num;
}
   }
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:59,代码来源:ScaleBilinearOpImage.java

示例4: ScaleGeneralOpImage

import javax.media.jai.Interpolation; //导入方法依赖的package包/类
/**
    * Constructs a ScaleGeneralOpImage from a RenderedImage source,
    * 
    * @param source a RenderedImage.
    * @param extender a BorderExtender, or null.

    * @param layout an ImageLayout optionally containing the tile grid layout,
    *        SampleModel, and ColorModel, or null.
    * @param xScale scale factor along x axis.
    * @param yScale scale factor along y axis.
    * @param xTrans translation factor along x axis.
    * @param yTrans translation factor along y axis.
    * @param interp a Interpolation object to use for resampling.
    */
   public ScaleGeneralOpImage(RenderedImage source,
                              BorderExtender extender,
		       Map config,
                              ImageLayout layout,
		       float xScale,
		       float yScale,
		       float xTrans,
		       float yTrans,
		       Interpolation interp) {

       super(source,
             layout,
             config,
             true,
             extender,
             interp,
             xScale,
             yScale,
             xTrans,
             yTrans);

subsampleBits = interp.getSubsampleBitsH();

// Internal precision required for position calculations
one = 1 << subsampleBits;

// Get the width and height and padding of the Interpolation kernel.
interp_width = interp.getWidth();
interp_height = interp.getHeight();
interp_left = interp.getLeftPadding();
interp_top = interp.getTopPadding();

if (invScaleYRational.num > invScaleYRational.denom) {
    invScaleYInt = invScaleYRational.num / invScaleYRational.denom;
    invScaleYFrac = invScaleYRational.num % invScaleYRational.denom;
} else {
    invScaleYInt = 0;
    invScaleYFrac = invScaleYRational.num;
}

if (invScaleXRational.num > invScaleXRational.denom) {
    invScaleXInt = invScaleXRational.num / invScaleXRational.denom;
    invScaleXFrac = invScaleXRational.num % invScaleXRational.denom;
} else {
    invScaleXInt = 0;
    invScaleXFrac = invScaleXRational.num;
}
   }
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:63,代码来源:ScaleGeneralOpImage.java

示例5: ScaleBilinearBinaryOpImage

import javax.media.jai.Interpolation; //导入方法依赖的package包/类
/**
 * Constructs a ScaleBilinearBinaryOpImage from a RenderedImage source,
 * 
 * @param source a RenderedImage.
 * @param layout an ImageLayout optionally containing the tile grid layout,
 *        SampleModel, and ColorModel, or null.
 * @param xScale scale factor along x axis.
 * @param yScale scale factor along y axis.
 * @param xTrans translation factor along x axis.
 * @param yTrans translation factor along y axis.
 * @param interp an Interpolation object to use for resampling.
 */

public ScaleBilinearBinaryOpImage(RenderedImage source,
		    BorderExtender extender,
		    Map config,
		    ImageLayout layout,
		    float xScale,
		    float yScale,
		    float xTrans,
		    float yTrans,
		    Interpolation interp) 
{
  super(source,
  layout, 
  config,
  true,
  extender,
  interp,
  xScale,
  yScale,
  xTrans,
  yTrans);

  subsampleBits =  interp.getSubsampleBitsH ();

  // Numnber of subsampling positions
  one = 1 << subsampleBits;

  //Subsampling related variables
  shift2 = 2 * subsampleBits;
  round2 = 1 << (shift2 - 1);

  // Propagate source's ColorModel
  if (layout != null) 
  {
    colorModel = layout.getColorModel(source);
  } 
  else 
  {
    colorModel = source.getColorModel();
  }
  
  sampleModel = source.getSampleModel().createCompatibleSampleModel(tileWidth, tileHeight);
  
  if (invScaleXRational.num > invScaleXRational.denom) 
  {
    invScaleXInt = invScaleXRational.num / invScaleXRational.denom;
    invScaleXFrac = invScaleXRational.num % invScaleXRational.denom;
  } 
  else 
  {
    invScaleXInt = 0;
    invScaleXFrac = invScaleXRational.num;
  }

  if (invScaleYRational.num > invScaleYRational.denom) 
  {
    invScaleYInt = invScaleYRational.num / invScaleYRational.denom;
    invScaleYFrac = invScaleYRational.num % invScaleYRational.denom;
  } 
  else 
  {
    invScaleYInt = 0;
    invScaleYFrac = invScaleYRational.num;
  }
}
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:78,代码来源:ScaleBilinearBinaryOpImage.java

示例6: ScaleBicubicOpImage

import javax.media.jai.Interpolation; //导入方法依赖的package包/类
/**
    * Constructs a ScaleBicubicOpImage from a RenderedImage source,
    * 
    * @param source a RenderedImage.
    * @param extender a BorderExtender, or null.
    * @param layout an ImageLayout optionally containing the tile grid layout,
    *        SampleModel, and ColorModel, or null.
    * @param xScale scale factor along x axis.
    * @param yScale scale factor along y axis.
    * @param xTrans translation factor along x axis.
    * @param yTrans translation factor along y axis.
    * @param interp a Interpolation object to use for resampling.
    */
   public ScaleBicubicOpImage(RenderedImage source,
                              BorderExtender extender,
		       Map config,
                              ImageLayout layout,
		       float xScale,
		       float yScale,
		       float xTrans,
		       float yTrans,
		       Interpolation interp) {
       super(source,
             layout,
             config,
             true,
             extender,
             interp,
             xScale,
             yScale,
             xTrans,
             yTrans);

subsampleBits = interp.getSubsampleBitsH();
interpTable = (InterpolationTable)interp;

// Number of subsample positions
one = 1 << subsampleBits;
precisionBits = interpTable.getPrecisionBits();
if (precisionBits > 0) {
    round = 1<< (precisionBits - 1);
}

if (invScaleYRational.num > invScaleYRational.denom) {
    invScaleYInt = invScaleYRational.num / invScaleYRational.denom;
    invScaleYFrac = invScaleYRational.num % invScaleYRational.denom;
} else {
    invScaleYInt = 0;
    invScaleYFrac = invScaleYRational.num;
}

if (invScaleXRational.num > invScaleXRational.denom) {
    invScaleXInt = invScaleXRational.num / invScaleXRational.denom;
    invScaleXFrac = invScaleXRational.num % invScaleXRational.denom;
} else {
    invScaleXInt = 0;
    invScaleXFrac = invScaleXRational.num;
}
   }
 
开发者ID:RoProducts,项目名称:rastertheque,代码行数:60,代码来源:ScaleBicubicOpImage.java


注:本文中的javax.media.jai.Interpolation.getSubsampleBitsH方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。