使用Motion Raspberry Pi 4保存时更改图像的文件大小

问题描述

这是我在这里的第一个问题! 首先,我面临使用运动覆盆子pi 4保存图像文件大小的问题。 我想做的是将保存的图片发送到Line Notify,以便能够在手机上看到。要发送的文件大小应小于3MB。图像保存为3.6 MiB(3825915字节)。

这是我收到的消息。

// construct a type that is the union of all possible generic subsitution
type ConfigUnion = {
    [Key in TheEnum]: Config<Key>;
}[TheEnum];

function caller(configArr: Config<TheEnum>[]) {
    configArr.map((currentConfig: Config<TheEnum>) => {
        const currentGetter = getterMap[currentConfig.key] as any;
        const newParams = currentGetter(currentConfig.params) as ConfigUnion;

        // now TypeScript can discriminate the actual type based on its key.

        if (newParams.key == TheEnum.Foo) {
            newParams.params.a // OK
            newParams.params.z // not OK
        }

        if (newParams.key == TheEnum.Bar) {
            newParams.params.z // OK
        }
    })
}

如果有人知道,请帮助我。 谢谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...