ImageMagick

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

纵然是瞬间 提交于 2020-01-14 12:21:06
问题 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

BiCubic Shaper PHP Image Resize

亡梦爱人 提交于 2020-01-14 11:52:27
问题 Photoshop has that great: BiCube Shaper option for resizing. However I cannot find an equivalent. I've seen various code using GD that used imagecopyresampled and custom unsharp mask, but no where near the quality I am expecting. Any help? 回答1: If all you've tried is GD, you might want to give some of the ImageMagick sampling filters a shot. Here's a page that examines them along with the PhotoShop ones: http://www.xs4all.nl/~bvdwolf/main/foto/down_sample/down_sample.htm 来源: https:/

WScript is undefined

一笑奈何 提交于 2020-01-14 04:59:10
问题 I am trying to run a Javascript file locally, which is supposed to create a CSS image sprite using ImageMagick. It's part of the OpenID selector JS component: http://code.google.com/p/openid-selector/ The generate-sprite.js (http://code.google.com/p/openid-selector/source/browse/trunk/generate-sprite.js?r=140) file is supposed to create the image sprite automatically. However, whenever I run it in IE (the local version of the file, of course), I get the error SCRIPT5009: 'WScript' is

How to get EXIF keywords using mini_magick in a Rails app?

守給你的承諾、 提交于 2020-01-13 19:07:54
问题 I am attempting to pull the EXIF information for images that have values for the EXIF "keywords" attribute. I have successfully read EXIF information using mini_magick by simply opening an image and using: image["EXIF:Model"] For some reason, none of the following will return keywords for an image that I know has them: image["EXIF:Keywords"] image["EXIF:XPKeywords"] image["EXIF:Subject"] I have confirmed that the image in question does have this information using this utility: http://regex

Image magick/PHP is falling over with large images

旧街凉风 提交于 2020-01-13 11:49:09
问题 I have a PHP script which is used to resize images in a user's FTP folder for use on his website. While slow to resize, the script has completed correctly with all images in the past. Recently however, the user uploaded an album of 21-Megapixel JPEG images and as I have found, the script is failing to convert the images but not giving out any PHP errors. When I consulted various logs, I've found multiple Apache processes being killed off with Out Of Memory errors. The functional part of the

c++ decode CCITT encoded images in pdfs

痴心易碎 提交于 2020-01-13 11:39:07
问题 I'm trying to extract all images out of PDF files in C++. I'm stuck in decoding CCITT encoded images. Does anyone know an opensourced code for this? I use the ImageMagick Magick++ Library, is it possible to do the decoding with this library, too? Thanks for your help! 回答1: CCITT is one of the encodings TIFF supports, though in a PDF file the CCITT images are probably raw data. You can convert a raw CCITT image into a Tiff image using Fax2Tiff. It should be easy enough to work with the image

Create drop shadow effects in Imagemagick

拟墨画扇 提交于 2020-01-13 10:13:26
问题 The border shadow effects used in the images of this blog post seem to be embeded in the images themselves (not css3). How can it be created in imagemagick? Edit 1: The solution which I found quite accidentlly is posted below as an answer. 回答1: There is a -shadow argument on convert that has options to do this. http://blog.bemoko.com/2009/07/01/add-shadow-and-border-to-images-with-imagemagick/ 回答2: Somehow I found the command which does what I wanted exactly: For images which are already

ImageMagick Unable to change colour in shade explicitly for image

柔情痞子 提交于 2020-01-13 06:08:32
问题 I want to use ImageMagick to change colour in shade. I am able to manage the shade change using : convert input.png -colorspace HCL -channel R -evaluate set 5% +channel -colorspace sRGB output.png Using set XX% i am able to get different colours like, red, green, yellow, blue, pink, sky-blue, gray, etc. The below command works for targeting blue colour : convert input.png -colorspace HCL -channel R -separate +channel -level 48,52% output.png But I am unable to target other colour explicitly.

Ruby on Rails error: “Undefined method `call' for ”result == false“:String” error in create method

雨燕双飞 提交于 2020-01-13 05:15:48
问题 When I try to create a listing in my app with an image this error is thrown: undefined method `call' for "result == false":String. The error occurred after I installed devise gem. But devise shouldn't have anything to do with creating a new listing? The other parts of the app works fine, and I can create new listings without images. Error message NoMethodError in ArtistsController#create undefined method `call' for "result == false":String The method it points to is a callback method in

ImageMagick - How do I flatten white levels to pure white?

倖福魔咒の 提交于 2020-01-13 02:53:10
问题 I have a png image with a white background which I'd like to turn transparent. This is fairly simple with this command: $ convert image.png -transparent white image-trans.png However, if the white background is not completely white (i.e, #FFFFFF , rgb(255,255,255) , etc), then this doesn't work well. Is there a way to set reduce everything below a certain threshold to complete white? Thanks. 回答1: The commandline option you are looking for is -white-threshold value{%} So a command of convert