graphicsmagick

GraphicsMagic is unable to identify background transparency of PDF

和自甴很熟 提交于 2021-02-18 18:54:59
问题 GM is unable to identify background transparency of PDF and PNG created using "gm convert" gets white background while same PDF is converted to PNG with transparent background by IM. $convert -verbose /var/tmp/abc.pdf /var/tmp/abc.png /var/tmp/magick-16370Tq7WYv5U54Pa1 PNG 288x720 288x720+0+0 8-bit sRGB 20.7KB 0.000u 0:00.009 /var/tmp/abc.pdf PDF 288x720 288x720+0+0 16-bit sRGB 20.7KB 0.000u 0:00.000 /var/tmp/abc.pdf=>/var/tmp/abc.png PDF 288x720 288x720+0+0 8-bit sRGB 17c 16.6KB 0.010u 0:00

GraphicsMagic is unable to identify background transparency of PDF

时间秒杀一切 提交于 2021-02-18 18:54:36
问题 GM is unable to identify background transparency of PDF and PNG created using "gm convert" gets white background while same PDF is converted to PNG with transparent background by IM. $convert -verbose /var/tmp/abc.pdf /var/tmp/abc.png /var/tmp/magick-16370Tq7WYv5U54Pa1 PNG 288x720 288x720+0+0 8-bit sRGB 20.7KB 0.000u 0:00.009 /var/tmp/abc.pdf PDF 288x720 288x720+0+0 16-bit sRGB 20.7KB 0.000u 0:00.000 /var/tmp/abc.pdf=>/var/tmp/abc.png PDF 288x720 288x720+0+0 8-bit sRGB 17c 16.6KB 0.010u 0:00

gm conversion issue in node.js

北城以北 提交于 2021-02-07 05:36:05
问题 I am converting an image from jpg to png, but it is giving the error. Below is the code and error. gm('E:/image1.jpg').write('E:/image2.png', function(err){ if (err){ console.log(err); } else{console.log('image converted.')} }) The error is: [Error: Could not execute GraphicsMagick/ImageMagick: gm "convert" "E:/image1.jpg" "E:/image2.png" this most likely means the gm/convert binaries can't be found] Do I have to npm graphicsmagick and imagemagick? 回答1: Probably graphicsmagick / imagemagick

Heroku building app fail: error to load gem 'graphicsmagick'

末鹿安然 提交于 2020-06-18 13:12:49
问题 when I push my rails app to heroku it always fails. On the stage "Build App" the logs show me following message: checking for gm... no ! rake aborted! ! Bundler::GemRequireError: There was an error while trying to load the gem 'graphicsmagick'. I have required this gem in the Gemfile and I don't know why building app on heroku always fails. Local running and running on CircleCI are ok. Did someone have similar issue? Please let me know what I've missed. Thank you. 回答1: Do you have the

Heroku building app fail: error to load gem 'graphicsmagick'

笑着哭i 提交于 2020-06-18 13:10:21
问题 when I push my rails app to heroku it always fails. On the stage "Build App" the logs show me following message: checking for gm... no ! rake aborted! ! Bundler::GemRequireError: There was an error while trying to load the gem 'graphicsmagick'. I have required this gem in the Gemfile and I don't know why building app on heroku always fails. Local running and running on CircleCI are ok. Did someone have similar issue? Please let me know what I've missed. Thank you. 回答1: Do you have the

Heroku building app fail: error to load gem 'graphicsmagick'

孤街浪徒 提交于 2020-06-18 13:10:07
问题 when I push my rails app to heroku it always fails. On the stage "Build App" the logs show me following message: checking for gm... no ! rake aborted! ! Bundler::GemRequireError: There was an error while trying to load the gem 'graphicsmagick'. I have required this gem in the Gemfile and I don't know why building app on heroku always fails. Local running and running on CircleCI are ok. Did someone have similar issue? Please let me know what I've missed. Thank you. 回答1: Do you have the

前端笔记之React(八)上传&图片裁切

非 Y 不嫁゛ 提交于 2020-04-22 07:14:12
一 、 上传 formidable 天生可以处理上传的文件,非常简单就能持久上传的文件。 今天主要讲解的是,前后端的配合套路。 上传分为同步、异步。同步公司使用非常多,异步我们也会讲解。 1.1 先看一下 antd 中的 Form 和代码校验 我们看antd 中的 Form 组件, https://ant.design/components/form-cn/ 所谓的装饰器指的是将一个组件作为一个函数的参数。 MyForm 是一个标准的组件,要用 Form.create()() 装饰一下。 const WrappedRegistrationForm = Form.create()(MyForm); 装饰器,就是函数后面有两个圈比如, getFieldDecorator ()() 。第一个圈里写如何装饰,第二个圈里写被装饰的组件。 慢慢去分析人家的API ,慢慢看,慢慢琢磨。 1.2 上传前端套路和 formidable 的实现 <input type="file"/> 我们现在要制作提交,前端界面必须满足几点: 1 )必须要用 form 标签嵌套,这是一个表单,不是一个 ajax 程序; 2 )表单的 method 属性必须是 POST 3 )必须有 enttype ,值是“ multipart/form-data ”,什么意思?下面有图片讲解 4) file 控件必须有 name

分布式图片系统

自古美人都是妖i 提交于 2020-02-27 12:26:20
概述 随着公司的快速发展,公司对外服务的系统在展现形式方面出现了多样化,目前包括Web端和手机端,不同的展现形式由于设备的多样性和设备对网络的依赖程度的不同,在对图片的尺寸或质量上都有不同的要求。原本为了满足不同设备的要求,在图片存储上会存储各种所需尺寸的图片,浪费了大量的磁盘空间,同时也浪费了高性能的硬件机器利用率。 同时公司对外的业务系统在数量和每个业务系统支撑的用户群方面也在快速的增长,势必会在对图片的请求上出现爆炸式的增长,这对图片系统的快速反映和高可用性提出了更高的要求,在保证公司的快速发展前提下,如何不降低用户使用系统的体验质量,如何保证7x24小时的高可靠性服务,在这个契机下,我们推出了分布式图片系统。 该系统在设计之初就充分考虑了上述问题,同时考虑到公司业务快速发展下,系统日后的可持续发展和系统的扩展性,从更全局的高度来定位这个系统的价值和目标,经过设计和论证,该系统在以下方面提供的服务和支持: 前端采用Nginx为web服务器,利用其高并发特性,提供对高并发访问量的支持 利用nginx的代理缓存特性和硬件的海量磁盘容量,为系统搭建了图片缓存模块,保证系统对已经处理过的图片资源进行再次访问时快速有效的提供响应,提高了系统的响应速度并避免了资源的重复执行,造成浪费,提高了系统利用率 图片数据源采用了多套方案实现,为使公司原有业务

How to make circle thumbnail with GraphicsMagick?

本小妞迷上赌 提交于 2020-01-23 03:39:11
问题 While exploring how to make circular crop with GraphicsMagick i came to that code: gm convert -thumbnail 200x200^ -extent 200x200 kira.jpg kira_new.jpg && gm convert -size 200x200 xc:none -fill white -draw "circle 100,100 110,0" tmp.png && gm composite -compose CopyOpacity tmp.png kira_new.jpg out.png Here's what it does: Creates 200x200 temp file named kira_new.jpg Creates transparent tmp.png with white circle in the middle Composition on tmp.png and kira_new.jpg So the question is: is there

Do I have access to GraphicsMagicks or ImageMagicks in a Google Cloud Function?

心已入冬 提交于 2020-01-14 12:21:11
问题 I want to make a Google Cloud Function that will correctly set the content type of uploaded files. I know how to do this with GraphicsMagick or ImageMagick, but I'm not sure if Google Cloud Function has those native libraries. How do I find out if they have them or failing that how do I get them installed? 回答1: Google Cloud Functions run in a container that has ImageMagick installed. Somehow the Firebase documentation seems to have best documentation for it. From there: Cloud Functions