- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中us.ihmc.codecs.generated.YUVPicture
类的一些代码示例,展示了YUVPicture
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YUVPicture
类的具体详情如下:
包路径:us.ihmc.codecs.generated.YUVPicture
类名称:YUVPicture
暂无
代码示例来源:origin: us.ihmc/RobotDataCommunication
double scaleWidth = ((double) labelSize.getWidth()) / ((double) img.getWidth());
double scaleHeight = ((double) labelSize.getHeight()) / ((double) img.getHeight());
int newWidth = ((int) (scaleWidth * (double) img.getWidth()) >> 1) << 1;
int newHeight = ((int) (scaleHeight * (double) img.getHeight()) >> 1) << 1;
img.scale(newWidth, newHeight, FilterModeEnum.kFilterBilinear);
image = converter.toBufferedImage(img, image);
ImageIcon icon = new ImageIcon(image);
label.setIcon(icon);
img.delete();
代码示例来源:origin: us.ihmc/ihmc-video-codecs
public YUVPicture decodeFrame(java.nio.ByteBuffer frame, int srcLength) {
assert frame.isDirect() : "Buffer must be allocated direct.";
{
long cPtr = ihmcVideoCodecsJNI.OpenH264DecoderImpl_decodeFrame(swigCPtr, this, frame, srcLength);
return (cPtr == 0) ? null : new YUVPicture(cPtr, true);
}
}
代码示例来源:origin: us.ihmc/ihmc-video-codecs
public YUVPicture(YUVPicture.YUVSubsamplingType type, int width, int height, int yStride, int uStride, int vStride, java.nio.ByteBuffer Yin, java.nio.ByteBuffer Uin, java.nio.ByteBuffer Vin) {
this(YUVPicture.SwigConstructYUVPicture(type, width, height, yStride, uStride, vStride, Yin, Uin, Vin), true);
}
代码示例来源:origin: us.ihmc/IHMCVideoCodecs
public static void main(String[] args) throws IOException
{
JPEGDecoder decoder = new JPEGDecoder();
YUVPicture jpeg = decoder.readJPEG(JPEGExample.class.getClassLoader().getResource("testImage.jpg"));
jpeg.scale(jpeg.getWidth() * 2, jpeg.getHeight() * 2, FilterModeEnum.kFilterBilinear);
JPEGEncoder encoder = new JPEGEncoder();
int maxSize = (int) encoder.maxSize(jpeg);
ByteBuffer buffer = ByteBuffer.allocateDirect((int) maxSize);
int size = encoder.encode(jpeg, buffer, maxSize, 90);
buffer.limit(size);
RandomAccessFile file = new RandomAccessFile("test.jpg", "rw");
FileChannel channel = file.getChannel();
channel.write(buffer);
file.close();
}
}
代码示例来源:origin: us.ihmc/IHMCVideoCodecs
protected void finalize() {
delete();
}
代码示例来源:origin: us.ihmc/IHMCRobotDataLogger
builder = new MP4H264MovieBuilder(target, frame.getWidth(), frame.getHeight(), frameRate, bitrate, EUsageType.CAMERA_VIDEO_REAL_TIME);
frame.delete();
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
private void doTheNextFrame(YUVPicture picture)
{
int width = jPanel.getWidth();
int height = jPanel.getHeight();
if (width < 1 || height < 1)
return;
picture.scale(width, height, FilterModeEnum.kFilterBilinear);
bufferedImage = converter.toBufferedImage(picture, bufferedImage);
SwingUtilities.invokeLater(new Runnable()
{
@Override
public void run()
{
imageIcon = new ImageIcon(bufferedImage);
jLabel.setIcon(imageIcon);
}
});
picture.delete();
}
代码示例来源:origin: us.ihmc/ihmc-video-codecs
protected void finalize() {
delete();
}
代码示例来源:origin: us.ihmc/RobotDataCommunication
builder = new MP4H264MovieBuilder(target, frame.getWidth(), frame.getHeight(), frameRate, bitrate, EUsageType.CAMERA_VIDEO_REAL_TIME);
frame.delete();
代码示例来源:origin: us.ihmc/ihmc-video-codecs
public static void main(String[] args) throws IOException
{
JPEGDecoder decoder = new JPEGDecoder();
YUVPicture jpeg = decoder.readJPEG(JPEGExample.class.getClassLoader().getResource("testImage.jpg"));
jpeg.scale(jpeg.getWidth() * 2, jpeg.getHeight() * 2, FilterModeEnum.kFilterBilinear);
JPEGEncoder encoder = new JPEGEncoder();
int maxSize = (int) encoder.maxSize(jpeg);
ByteBuffer buffer = ByteBuffer.allocateDirect((int) maxSize);
int size = encoder.encode(jpeg, buffer, maxSize, 90);
buffer.limit(size);
RandomAccessFile file = new RandomAccessFile("test.jpg", "rw");
FileChannel channel = file.getChannel();
channel.write(buffer);
file.close();
}
}
代码示例来源:origin: us.ihmc/IHMCCommunication
frame.scale(desiredEvenHorizontalResolution, desiredEvenVerticalResolution, FilterModeEnum.kFilterBilinear);
try
frame.delete();
while(encoder.nextNAL())
代码示例来源:origin: us.ihmc/IHMCRobotDataVisualizer
double scaleWidth = ((double) labelSize.getWidth()) / ((double) img.getWidth());
double scaleHeight = ((double) labelSize.getHeight()) / ((double) img.getHeight());
int newWidth = ((int) (scaleWidth * (double) img.getWidth()) >> 1) << 1;
int newHeight = ((int) (scaleHeight * (double) img.getHeight()) >> 1) << 1;
img.scale(newWidth, newHeight, FilterModeEnum.kFilterBilinear);
image = converter.toBufferedImage(img, image);
ImageIcon icon = new ImageIcon(image);
label.setIcon(icon);
img.delete();
代码示例来源:origin: us.ihmc/ihmc-robot-data-visualizer
@Override
public void run()
{
img = converter.toBufferedImage(nextFrame, img);
nextFrame.delete();
ImageIcon icon = new ImageIcon(img);
label.setIcon(icon);
if (img.getWidth() != width || img.getHeight() != height)
{
width = img.getWidth();
height = img.getHeight();
label.setPreferredSize(new Dimension(width, height));
pack();
}
}
});
代码示例来源:origin: us.ihmc/ihmc-robot-data-visualizer
builder = new MP4H264MovieBuilder(target, frame.getWidth(), frame.getHeight(), frameRate, settings);
frame.delete();
代码示例来源:origin: us.ihmc/IHMCVideoCodecs
public YUVPicture decodeFrame(java.nio.ByteBuffer frame, int srcLength) {
assert frame.isDirect() : "Buffer must be allocated direct.";
{
long cPtr = ihmcVideoCodecsJNI.OpenH264DecoderImpl_decodeFrame(swigCPtr, this, frame, srcLength);
return (cPtr == 0) ? null : new YUVPicture(cPtr, true);
}
}
代码示例来源:origin: us.ihmc/IHMCVideoCodecs
public YUVPicture(YUVPicture.YUVSubsamplingType type, int width, int height, int yStride, int uStride, int vStride, java.nio.ByteBuffer Yin, java.nio.ByteBuffer Uin, java.nio.ByteBuffer Vin) {
this(YUVPicture.SwigConstructYUVPicture(type, width, height, yStride, uStride, vStride, Yin, Uin, Vin), true);
}
代码示例来源:origin: us.ihmc/ihmc-robot-data-visualizer
double scaleWidth = ((double) labelSize.getWidth()) / ((double) img.getWidth());
double scaleHeight = ((double) labelSize.getHeight()) / ((double) img.getHeight());
int newWidth = ((int) (scaleWidth * (double) img.getWidth()) >> 1) << 1;
int newHeight = ((int) (scaleHeight * (double) img.getHeight()) >> 1) << 1;
img.scale(newWidth, newHeight, FilterModeEnum.kFilterBilinear);
image = converter.toBufferedImage(img, image);
ImageIcon icon = new ImageIcon(image);
label.setIcon(icon);
img.delete();
代码示例来源:origin: us.ihmc/RobotDataCommunication
@Override
public void run()
{
img = converter.toBufferedImage(nextFrame, img);
nextFrame.delete();
ImageIcon icon = new ImageIcon(img);
label.setIcon(icon);
if (img.getWidth() != width || img.getHeight() != height)
{
width = img.getWidth();
height = img.getHeight();
label.setPreferredSize(new Dimension(width, height));
pack();
}
}
});
代码示例来源:origin: us.ihmc/IHMCVideoCodecs
public YUVPicture decode(java.nio.ByteBuffer src, int srcLength) {
assert src.isDirect() : "Buffer must be allocated direct.";
{
long cPtr = ihmcVideoCodecsJNI.JPEGDecoderImpl_decode(swigCPtr, this, src, srcLength);
return (cPtr == 0) ? null : new YUVPicture(cPtr, true);
}
}
代码示例来源:origin: us.ihmc/ihmc-video-codecs
checkBitrate();
if (pic.getWidth() != width || pic.getHeight() != height)
pic.scale(width, height, FilterModeEnum.kFilterBilinear);
pic.delete();
我是 Julia 的新手。 我主要用python编程。 在 python 中, 如果你想迭代大量的值, 通常构造一个所谓的生成器来节省内存使用。 这是一个示例代码: def generator(N):
这个问题很奇怪。我试图直接在 build.gradle 中添加一个字符串,因为我需要它来使用 Tray 库 ( https://github.com/grandcentrix/tray )。在我的第一
我正在尝试在我的新 symfony3 项目中使用生成 CRUD 功能。我创建了一个名为 AdminBundle 的 bundle ,其中包含生成器、实体测试以及生成器,所有这些都处理得很好。我检查了我
我尝试理解生成器,但我发现了一个我无法遵循的示例。 // First Generator function* Colors () { yield "blue"; yield* MoreColo
我将制作一款完全由程序生成的空间/交易/战斗游戏。但是,我知道将整个星系的所有细节存储在内存中是不可行的。因此,我一直认为我可以使用种子来生成太阳系,并且从该太阳系,您可以使用跳跃门前往其他太阳系。问
我在 Eclipse Helios 中使用 MyBatis Generator (MyBatis Generator 1.3.1.201101032122),但每次我自动生成持久类时,生成器都会删除属
@GenerateInterface class A {} @GenerateInterface class B { void setA(IA a) {} } 我的注释处理器应该生成这些接口(in
我刚刚在一个空目录中安装了 yeoman,它打印出一个错误。这就是我所做的: npm i yo -g npm i generator-webapp -g 之后我抛出一个错误: require('yeo
我正在使用 NReco PDFGenerator 从 HTML 字符串创建 PDF 文档。当表格被分页符拆分时,表格标题与表格中的下一行重叠(见下图)。 有想法该怎么解决这个吗? 最佳答案 我发现这是
我有这个命名空间: namespace :manage do # Directs /manage/products/* to Manage::ProductsController
我有一个 Open API 3 规范的 yaml 文件,它有一些 x- 前缀的属性。我正在尝试使用 openapi-generator-cli 生成一个 Angular Typescript SDK。
我有一个返回生成器的函数。目前它使用yield from: function foo() { $generator = getGenerator(); // some other st
我选择Symfony2 docs 。据说添加 /** * @ORM\Entity(repositoryClass="Acme\StoreBundle\Entity\ProductRepository
运行命令生成新的 rails 项目: $ rails generate controller home index 以上将创建四个新的 Rails 项目:generate、controller、hom
我们实际上已经将jvm内存增加到了256M,现在老年代看起来很小,但Perm Generation相当高,接近80%。通过 jstat 捕获的示例数据如下。高永久代意味着什么? Timestamp
class Invoice def Invoice.generate(order_id, charge_amount, credited_amount = 0.0) Invoice.new
我在写 this comparison为了帮助人们理解所有这些废话,目前看来,generator-angular 的好处和值(value)只是您使用 generator-angular-fullsta
我有一个包含以下代码段的 OpenAPI 规范文档(我无法控制): servers: - url: http://www.[someservice].com/api 我正在使用这个 OpenAPI
我正在使用 openapi-yaml 将 swagger 文件转换为开放的 API v3 文件。使用 Maven 生成器。 我想做的是将新文件直接放入某个目录。 但是会生成一些我不需要的其他文件,例如
我的生成器中有以下标准文件夹结构。我当前正在努力解决的任务是我目前有一个模板化的 _package.json ,我将其写入磁盘以用于主要生成。我想在编写的 package.json 中包含一个变量,它
我是一名优秀的程序员,十分优秀!