graphicsmagick

Graphicsmagick not working in Elastic Beanstalk with nodejs and S3

核能气质少年 提交于 2019-12-01 08:13:14
I'm using nodejs and graphicsmagick to process images with text, then streaming the final jpg to S3. Using postman, I was able to test this flow on my localhost and everything works fine. However, I'm having issues now that I moved it to Elastic Beanstalk. When I post to the endpoint, it uploads a blank file to S3 and there are no errors logged in EB. I think it has something to do with the software but am a bit stuck. Any advice appreciated! Thanks! Top file is from localhost, bottom file is from Elastic Beanstalk: http://cl.ly/image/0O231k171N0W var gm = require('gm'); var appRoot = require(

Extract frame of gif with graphicsmagick in node.js

回眸只為那壹抹淺笑 提交于 2019-11-30 21:04:10
I am trying to convert a gif into a png using graphicsmagick on node.js. In their documentation they have the following code: // pull out the first frame of an animated gif and save as png gm('/path/to/animated.gif[0]') .write('/path/to/firstframe.png', function(err){ if (err) print('aaw, shucks') }) But what if I read the data not from a file, but from a stream or buffer? There I do not have to give a path and therefore cannot append the [0]. What I need is something like this: gm(streamOrBuffer).extractFrame(0) .write('/path/to/firstframe.png', function(err){ if (err) print('aaw, shucks') })

Stream file uploaded with Express.js through gm to eliminate double write

这一生的挚爱 提交于 2019-11-30 12:55:18
问题 I'm using Express.js and have a route to upload images that I then need to resize. Currently I just let Express write the file to disk (which I think uses node-formidable under the covers) and then resize using gm (http://aheckmann.github.com/gm/) which writes a second version to disk. gm(path) .resize(540,404) .write(dest, function (err) { ... }); I've read that you can get a hold of the node-formidable file stream before it writes it to disk, and since gm can accept a stream instead of just

Extract frame of gif with graphicsmagick in node.js

谁说胖子不能爱 提交于 2019-11-30 05:25:29
问题 I am trying to convert a gif into a png using graphicsmagick on node.js. In their documentation they have the following code: // pull out the first frame of an animated gif and save as png gm('/path/to/animated.gif[0]') .write('/path/to/firstframe.png', function(err){ if (err) print('aaw, shucks') }) But what if I read the data not from a file, but from a stream or buffer? There I do not have to give a path and therefore cannot append the [0]. What I need is something like this: gm

Stream file uploaded with Express.js through gm to eliminate double write

心不动则不痛 提交于 2019-11-30 04:05:50
I'm using Express.js and have a route to upload images that I then need to resize. Currently I just let Express write the file to disk (which I think uses node-formidable under the covers) and then resize using gm (http://aheckmann.github.com/gm/) which writes a second version to disk. gm(path) .resize(540,404) .write(dest, function (err) { ... }); I've read that you can get a hold of the node-formidable file stream before it writes it to disk, and since gm can accept a stream instead of just a path, I should be able to pass this right through eliminating the double write to disk. I think I

Meteor Up Docker and Graphicsmagick

半城伤御伤魂 提交于 2019-11-30 03:17:44
问题 I'm looking for how to install Graphicsmagick at Meteor Up Docker. I found this solution (Access binaries inside docker) but I couldn't make work, where do I put those lines at start.sh ? meteorDockerId=docker ps | grep meteorhacks/meteord:base | awk '{print $1}' docker exec $meteorDockerId apt-get install graphicsmagick -y That's my start.sh : #!/bin/bash APPNAME=instagatas APP_PATH=/opt/$APPNAME BUNDLE_PATH=$APP_PATH/current ENV_FILE=$APP_PATH/config/env.list PORT=80 USE_LOCAL_MONGO=0 #

在node中使用graphicsmagick实现图片处理

南笙酒味 提交于 2019-11-30 00:43:59
GraphicsMagick is the swiss army knife of image processing。人称瑞士军刀。 为什么要用它? 1.免费的 2支持多达88种图片格式的处理,达到GB级别 3稳定及高效 下面是window操作 第一步:下载安装 graphicsmagick 官网地址: http://www.graphicsmagick.org/ 第二步:把安装目录设置为环境变量 测试成功页面如下: <ignore_js_op> 3、node调用graphicsmagick实现图片压缩、图片剪切 3-1:安装node的gm模块 [Shell] 纯文本查看 复制代码 ? 1 npm install gm 3-2:实现图片压缩 服务端核心代码: <ignore_js_op> 运行服务器端脚本: [JavaScript] 纯文本查看 复制代码 ? 1 node mg.js 或则 nodemon mg.js 效果图: 压缩前: <ignore_js_op> 压缩后: <ignore_js_op> 3-3:实现图像裁剪 服务端核心代码: <ignore_js_op> 运行服务器端脚本: [JavaScript] 纯文本查看 复制代码 ? 1 node mg.js 或则 nodemon mg.js 效果图: <ignore_js_op> 更多技术资讯可关注:gzitcast

Asynchronous GraphicsMagick For Node

旧城冷巷雨未停 提交于 2019-11-29 16:13:10
I am using GraphicsMagick for node. I basically crop the photos and retrieve the exif data of the photos uploaded by the user. I don't want to block the flow of request waiting for these task to be completed, therefore I need to use asynchronous functions to be able to do so. And I think I should be able to as these are I/O operations which node.js makes async itself. But as I see all the functions in GraphicsMagick for node are synchronous functions. So I am not being able to sure as to how to achieve what I am looking for. One idea that comes to my mind is to write a function with callback

在FreeBSD下安装GraphicsMagick

自古美人都是妖i 提交于 2019-11-29 06:45:55
以前在安装 GraphicsMagick 相关中文资料真的太少了,只用从未及格过的英文水平 硬着头皮去看哪里国外的安装过程 在FreeBSD 可以用POSTS安装 可以自己编译 不过程序员都有洁癖 POSTS安装会装很多东西 我也不清楚那些有没有什么用 呵呵 所以还是自己安装 版本:GraphicsMagick-1.3.12 安装前要装png jpeg freetype 的库 还得装到系统默认的目录 如果没有 ln -s /usr/local/lib/libpng.* /usr/lib/ cp -p /usr/local/include/libpng14/* /usr/include ln -s /usr/local/libjpeg/lib/*.* /usr/lib cp -p /usr/local/libjpeg/include/*.* /usr/include ln -s /usr/local/libxml/lib/*.* /usr/lib cp -p /usr/local/libxml/include/*.* /usr/include ln -s /usr/local/freetype/lib/*.* /usr/lib cp -p /usr/local/freetype/include/*.* /usr/include 注:jpeg 要装jpeg-6b 不然处理不了jpg图片

GraphicsMagick Linux安装

风格不统一 提交于 2019-11-29 06:45:44
GraphicsMagick 简单介绍 : GraphicsMagick号称图像处理领域的瑞士军刀。 短小精悍的代码却提供了一个鲁棒、高效的工具和库集合,来处理图像的读取、写入和操作,支持超过88中图像格式,包括重要的DPX、GIF、JPEG、JPEG-2000、PNG、PDF、PNM和TIFF。 通过使用OpenMP可是利用多线程进行图片处理,增强了通过扩展CPU提高处理能力。 GraphicsMagick可以再绝大多数的平台上使用,Linux、Mac、Windows都没有问题。 GraphicsMagick支持大图片的处理,并且已经做过GB级别的图像处理实验。GraphicsMagick能够动态的生成图片,特别适用于互联网的应用。可以用来处理调整尺寸、旋转、加亮、颜色调整、增加特效等方面。GaphicsMagick不仅支持命令行的模式,同时也支持C、C++、Perl、PHP、Tcl、Ruby等的调用。事实上,GraphicsMagick是从 ImageMagick 5.5.2 分支出来的,但是现在他变得更稳定和优秀,下面就是两个之间的一些比较。 GM更有效率( 测评 ),能更快的完成处理工作 GM更小更容易安装 GM已经被Flickr和Etsy使用,每天处理百万计的图片 GM与已经安装的软件不会发生冲突 GM几乎没有安全问题 GM的手册非常丰富 …(无关痛痒的正确的废话)