我基本上有一个字节矩阵.每行(意为byte [])表示图像.如何创建一个电影(任何格式 - avi,mpeg,等等),并将其保存为文件?每个图像可以是以下之一:
int JPEG Encoded formats.
int NV16 YCbCr format, used for video.
int NV21 YCrCb format used for images, which uses the NV21 encoding format.
int RGB_565 RGB format used for pictures encoded as RGB_565.
int YUY2 YCbCr format used for images, which uses YUYV (YUY2) encoding format.
int YV12 Android YUV format: This format is exposed to software decoders and applications.
Run Code Online (Sandbox Code Playgroud)
只要我创建电影,我就可以选择我喜欢的格式.
public void createMovie(byte[][] images) {
// and ideas on what to write here?
} …Run Code Online (Sandbox Code Playgroud) 如果我使用 ECR 中的图像而不是 S3 中的 jar 作为源代码,AWS Lambda 函数的冷启动是否会花费更长的时间?我认为是的,因为由于额外的操作系统层,图像更大(尽管......常规 Lambda 也应该有一些操作系统层),但我找不到任何性能基准。
谢谢!
我正在编写一个简单的Spring 3.1测试,在配置中添加以下行时出现异常:
<context:component-scan base-package="com.software.shared" />
Run Code Online (Sandbox Code Playgroud)
这是例外:
INFO: Loading XML bean definitions from class path resource [spring-config.xml]
Exception in thread "main" java.lang.NoClassDefFoundError: org.springframework.beans.FatalBeanException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:997)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:943)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:485)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at com.software.shared.PersonBeanTest.<init>(PersonBeanTest.java:15)
at com.software.shared.PersonBeanTest.main(PersonBeanTest.java:31)
Run Code Online (Sandbox Code Playgroud)
我不知道发生了什么事。如果我删除该行,则该异常消失,但是自动装配不起作用。
我在类路径中包含spring 3.1 RELEASE发行版中的所有jar,包括org.springframework.beans-3.1.0.RELEASE.jar,并检查了其中是否包含该文件。这是main方法中的代码:
package com.software.shared;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.core.io.ClassPathResource;
import org.springframework.stereotype.Service;
@Service
public class PersonBeanTest {
public PersonBeanTest() { …Run Code Online (Sandbox Code Playgroud)