ImageMagick

How to install rmagick gem on Windows?

冷暖自知 提交于 2019-12-19 06:03:00
问题 How do I install rmagick gem for Windows XP? I already installed ImageMagick with the header files, and I installed RailsInstaller.org which comes with DevKit. I don't know where to look to fix these errors. C:\RailsInstaller\ImageMagick-6.8.2-Q16>ruby -v ruby 1.9.3p125 (2012-02-16) [i386-mingw32] C:\RailsInstaller\ImageMagick-6.8.2-Q16>gem -v 1.8.16 C:\RailsInstaller\ImageMagick-6.8.2-Q16>path=%PATH%;C:\RailsInstaller\ImageMagick-6.8.2-Q16 C:\RailsInstaller\ImageMagick-6.8.2-Q16>identify

Run a simple command using PowerShell recursively on a directory

风格不统一 提交于 2019-12-19 05:59:27
问题 What's the fastest way using either DOS scripting or PowerShell to run this simple command on a directory and all its subdirectories: convert filename.jpg -resize 620x620 "R:\processed\filename.jpg" DOS Batch script for single directory : FOR %%a in (*.jpg) DO convert %%a -resize 620x620 "R:\processed\%%a" I want to run this recursively on a directory structure and have the output match the input hierarchy. I figured PowerShell was the easiest way, but I was unable to learn PowerShell in the

Run a simple command using PowerShell recursively on a directory

戏子无情 提交于 2019-12-19 05:59:10
问题 What's the fastest way using either DOS scripting or PowerShell to run this simple command on a directory and all its subdirectories: convert filename.jpg -resize 620x620 "R:\processed\filename.jpg" DOS Batch script for single directory : FOR %%a in (*.jpg) DO convert %%a -resize 620x620 "R:\processed\%%a" I want to run this recursively on a directory structure and have the output match the input hierarchy. I figured PowerShell was the easiest way, but I was unable to learn PowerShell in the

Python doesn't find MagickWand Libraries (despite correct location?)

大憨熊 提交于 2019-12-19 05:49:36
问题 I wanted to install the Python ImageMagick API wand and followed this site: http://docs.wand-py.org/en/latest/guide/install.html#install-imagemagick-on-windows However, when running a very simple test: from wand.image import Image I get the following output: Traceback (most recent call last): File "F:\PATHTO\Python34\lib\site-packages\wand\api.py", line 137, in libraries = load_library() File "F:\PATHTO\Python34\lib\site-packages\wand\api.py", line 107, in load_library raise IOError('cannot

Python doesn't find MagickWand Libraries (despite correct location?)

对着背影说爱祢 提交于 2019-12-19 05:49:09
问题 I wanted to install the Python ImageMagick API wand and followed this site: http://docs.wand-py.org/en/latest/guide/install.html#install-imagemagick-on-windows However, when running a very simple test: from wand.image import Image I get the following output: Traceback (most recent call last): File "F:\PATHTO\Python34\lib\site-packages\wand\api.py", line 137, in libraries = load_library() File "F:\PATHTO\Python34\lib\site-packages\wand\api.py", line 107, in load_library raise IOError('cannot

Equality test of images using ImageMagick

我的梦境 提交于 2019-12-19 04:14:28
问题 Is there any equality predicate function in ImageMagick library? I want to compare two images and find whether they are the exactly same (all colors of the pixels are the same) or have any differences. I’ve looked around, but it seems not to have a such function. Should I write the function using pixel iterators by myself? 回答1: ImageMagick provides the compare function to properly compare images. Checking the md5 checksum of two images is not the correct approach, since some image formats (e

Fastest way to create multiple thumbnails from a single large image in Python

微笑、不失礼 提交于 2019-12-19 04:01:39
问题 I have a library of large images (8000x6000px ~13mb) for which I would like to generate multiple thumbnails of smaller sizes with widths of 3000px, 2000px, 1000px, 500px, 250px, and 100px. The source image is stored in a flat file, and the generated thumbnails will also be stored in flat files. I've been thinking about the optimal way to do this in Python, and these are potential issues that immediately come to mind: Would it make sense to generate each thumbnail from source image, or can I

Set PHP ImageMagick tmp directory

一曲冷凌霜 提交于 2019-12-19 03:25:26
问题 I am trying to set the temporary directory that ImageMagick uses to convert files. Currently, when converting large PDFs, the temp folder quickly gets to 2 or 3 terabytes. This is too much to hold on the servers disk, so I plan to use an AWS EFS to store everything. I have the EFS drive mounted at /efs and am trying to use it for the temp path. How can I set this in ImageMagick? I have tried the following: Setting PHP's temp upload folder in php.ini - this breaks file uploads and is no good

ImageMagick preserve custom palette when joining 2 PNGs

浪子不回头ぞ 提交于 2019-12-19 03:16:12
问题 I need to join 2 PNG images, with 16 color palette, keep colors number and order as originals. Both PNGs use the same 16 color palette. There is a way to create 4 bit indexed PNG with all colors, in exact order, even unused in each PNG? Edit to be more clear: I have 2 pictures. The first is "level-000.png": It is identified as: Image: level-000.png Format: PNG (Portable Network Graphics) Mime type: image/png Class: PseudoClass Geometry: 144x144+0+0 Resolution: 28.35x28.35 Print size: 5

Cloud Functions for Firebase - Converting PDF to image

。_饼干妹妹 提交于 2019-12-19 02:18:07
问题 Cloud Functions for Firebase has this nice sample where they create a thumbnail for each uploaded image. This is done by making use of ImageMagick. I tried to convert the sample to convert PDFs to images. This is something ImageMagick can do, but I can't make it work with Cloud Functions for Firebase. I keep getting a code 1 error: ChildProcessError: `convert /tmp/cd9d0278-16b2-42be-aa3d-45b5adf89332.pdf[0] -density 200 /tmp/cd9d0278-16b2-42be-aa3d-45b5adf89332.pdf` failed with code 1 at