本文整理汇总了Java中org.openimaj.image.ImageUtilities.createBufferedImageForDisplay方法的典型用法代码示例。如果您正苦于以下问题:Java ImageUtilities.createBufferedImageForDisplay方法的具体用法?Java ImageUtilities.createBufferedImageForDisplay怎么用?Java ImageUtilities.createBufferedImageForDisplay使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.openimaj.image.ImageUtilities
的用法示例。
在下文中一共展示了ImageUtilities.createBufferedImageForDisplay方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getComponent
import org.openimaj.image.ImageUtilities; //导入方法依赖的package包/类
@Override
public Component getComponent(int width, int height) throws IOException {
final BufferedImage image = ImageUtilities.createBufferedImageForDisplay(mbfImage, null);
ic = new ScalingImageComponent(true);
ic.setImage(image);
ic.setSize(width, height);
ic.setPreferredSize(new Dimension(width, height));
ic.setShowPixelColours(false);
ic.setShowXYPosition(false);
ic.removeMouseListener(ic);
ic.removeMouseMotionListener(ic);
return ic;
}
示例2: paint
import org.openimaj.image.ImageUtilities; //导入方法依赖的package包/类
/**
* {@inheritDoc}
* @see javax.swing.JComponent#paint(java.awt.Graphics)
*/
@Override
public void paint( final Graphics g )
{
synchronized( this.visImage )
{
final BufferedImage bi = ImageUtilities.createBufferedImageForDisplay( this.dbImage );
g.drawImage( bi, 0, 0, null );
}
}