本文整理汇总了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;
}
示例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;
}
示例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;
}
}
示例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;
}
}
示例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;
}
}
示例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;
}
}