在将.ipa文件(使用Xcode GM Seed生成)上传到TestFlight时,我收到以下错误.
ERROR ITMS-90596:"无效的捆绑包.无法读取'Payload/Application.app/Assets.car'中的资产目录.尝试使用非测试版的Xcode重建应用程序并再次提交."
DBG-X:错误代码是:1102
有没有人遇到过类似的问题?
当图像放入s3存储桶时,我正在使用AWS Lambda将s3存储桶中的图像调整为使用节点js的不同大小的变体.
它一直工作到昨天.今天当我使用相同的lambda函数时,我收到以下错误:
{
"errorMessage": "Command failed: identify: not authorized `//bucketname.s3.amazonaws.com/imagename.jpg' @ error/constitute.c/ReadImage/454.\n",
"errorType": "Error",
"stackTrace": [
"",
"ChildProcess.proc.on.onExit (/var/task/node_modules/gm/lib/command.js:297:17)",
"emitTwo (events.js:87:13)",
"ChildProcess.emit (events.js:172:7)",
"maybeClose (internal/child_process.js:821:16)",
"Socket.<anonymous> (internal/child_process.js:319:11)",
"emitOne (events.js:77:13)",
"Socket.emit (events.js:169:7)",
"Pipe._onclose (net.js:469:12)"
]
}
Run Code Online (Sandbox Code Playgroud)
我无法理解为什么会出现这种现象.我下面的lambda函数的所有给定函数都在异步瀑布中,首先计算宽高比,然后将图像转换为不同的大小变体.
var request=require("request");
function getTheAspectRatio(callback) {
gm(s3Url) // I am constructing the image url in the AWS Lambda Function.
.size(function(err, size) {
if (!err) {
//Calculate the Aspect ratio
} else if (err) {
//Give Back …Run Code Online (Sandbox Code Playgroud) 我试图在生产机器中找到图像的尺寸.它返回错误.
无法执行GraphicsMagick/ImageMagick:识别"-ping""-format""%wx%h""uploads/userPhoto-1499669685192.png"这很可能意味着gm/convert二进制文件无法被创建== undefined
但是它在本地机器上工作正常,我已经在生产机器中上传了与本地机器相同的模块.
这与节点的"gm"扩展有关,http://aheckmann.github.io/gm/docs.html
我需要添加一些以边界框为中心的文本(水平足够).函数drawText()需要x,y坐标,但无法绘制居中文本.
否则我需要一个能够返回给定字体/大小的文本字符串宽度的函数,所以我可以在调用drawText()之前用javascript计算我的起始x位置.
将Expressjs与gm(GraphicsMagick)模块一起使用。
我想使用流作为.composite()的输入。
这可能吗,或者有什么办法吗?
我可以使用路径或包含图像路径的变量进行合成,但是我想传入流(myStream)。
例:
var myStream = fs.createReadStream('topimage.png');
var resultStream = gm('/images/background.png')
.composite(myStream)
.gravity('Center')
.geometry('-1020+520')
.stream();
Run Code Online (Sandbox Code Playgroud) 我正在从节点中的远程文件创建GIF,目前通过将每个图像下载到文件系统到tmp文件夹.
我想绕过将图像保存到tmp文件夹并保存在内存中.这可能吗?
如您所见,我的AWS类中有一个下载函数,它保存到tmp文件夹:
download(key){
return new Promise((resolve, reject) => {
request.head(`${this.base_url}/${this.bucket}/${key}`, (err, res, body) => {
request(`${this.base_url}/${this.bucket}/${key}`)
.pipe(fs.createWriteStream(`tmp/${key}`)).on('close', resolve )
})
})
};
Run Code Online (Sandbox Code Playgroud)
一旦他们全部下载了,我在我的GifService类中有一个createGif函数,它将每个文件路径添加为自定义参数gm,添加50ms的延迟,然后调整输出作为缓冲区,然后我上传到AWS s3.
import gm from 'gm';
...
constructor(){
this.gm = gm()
}
generateGif(images, prefix){
return new Promise((resolve, reject) => {
// for each image we want in array, we pass to gm
images.forEach(image => {
this.gm.in(`tmp/${image.Key}`)
})
// Now we create the gif with 50sec delay between images, sized to 600px x 2
this.gm
.delay(50) …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用GraphicsMagick for Node将所有非透明像素替换为给定颜色。
使用合成图像不是一种选择,我只需要将每个非透明像素更改为给定颜色。
原图:
目标:
透明像素应保持透明。我正在尝试实现 Photoshop 的颜色叠加效果:
我需要获取异步函数的值.我试图使用Promise,但这不起作用:
const res = new Promise(function (resolve, reject) {
gm(readStream).size({ bufferStream: true }, function (err, size) {
if (!err) resolve(size)
})
})
console.log(res)
Run Code Online (Sandbox Code Playgroud)
我得到的结果是 Promise { <pending> }
gm ×9
node.js ×7
imagemagick ×3
amazon-s3 ×1
aws-lambda ×1
express ×1
ios ×1
javascript ×1
promise ×1
seed ×1
testflight ×1
xcode ×1