ImageMagick

How do I convert a base64 image?

本秂侑毒 提交于 2019-12-22 03:24:32
问题 I am trying to use the "convert" command-line tool from ImageMagick. I have a base64 encoded png file and I need to convert it to another format. I am looking at documentation and a forum discussion which suggests that I should be able to use this syntax: convert inline:file.txt file.jpg But when I do this, I get this error message: convert: corrupt image `file.txt' @ error/constitute.c/ReadInlineImage/910. What am I doing wrong? How do I get convert to read a base64 image file? 回答1: Updated

Lossless merging of PDFs (PHP)

故事扮演 提交于 2019-12-22 01:32:26
问题 Currently I am using ImageMagick to merge multiple PDFs into one in a PHP script on my Linux system. However, the resulting PDFs are of very low quality. I have stumbled across pdftk which seems to have a better quality after the merging, but I need to use ImageMagick if possible because I need to get the script to run on another server which does not have pdftk (and it would be a pain to get it on there). How can I merge PDFs using ImageMagick and PHP with lossless quality? 回答1: ImageMagick

Imagemagick Specific webp calls in PHP

假装没事ソ 提交于 2019-12-22 00:02:23
问题 I was able to install webp support for imagemagick. But I'm missing some precise commands. The basic is covered thru: $im = new Imagick(); $im->pingImage($src); $im->readImage($src); $im->resizeImage($width,$height,Imagick::FILTER_CATROM , 1,TRUE ); $im->setImageFormat( "webp" ); $im->writeImage($dest); But I'm missing lots of fine tuning options as described in the imageMagick command line documentation here: http://www.imagemagick.org/script/webp.php Specifically: How do I set compression

Reverse engineering of mixed tiles of QR code

纵然是瞬间 提交于 2019-12-21 23:18:09
问题 I have 25 tiles, each 94x94px, of previously splitted QR code (470x470px). I need to recover QR code by combining all possible tiles into one image. 3 tiles suppose to be "anchors" or big squares located at NW, NE and SW corners. Therefore we have remaining 22 tiles with unknown position. How to generate all possible combinations using ImageMagick? UPDATE: My first approach is to generate text file (which later will be fed to ImageMagick as input) with all combinations, taking into account

Imagemagick skew image with 4 (x,y) coordinates

一个人想着一个人 提交于 2019-12-21 23:09:14
问题 I have 4 (x,y) coordinates between which I want place image as example given below. The whole image must be placed within this area without cropping. 回答1: Using this 800x600 balloon: You can use a "Perspective Distort" like this: convert balloon.jpg -matte -virtual-pixel transparent \ -distort Perspective '0,0,50,0 0,599,100,599 800,0,750,100 800,600,500,500' result.png There are basically 4 pairs of points in the parameters,i.e. Pt1X,Pt1Y,Pt1NewX,Pt1NewY Pt2X,Pt2Y,Pt2NewX,Pt2NewY Pt3X,Pt3Y

How to Link Imagemagick library to Qt(windows)

北城以北 提交于 2019-12-21 22:31:59
问题 I have developed an application with mac and for one month now, Im trying to link Qt with ImageMagick on windows. I just cant find the files and the version of Imagemagick library that need to be linked to Qt in order to make my application work on windows. I have tried most of the libraries from here Thats the only thing I added to the .pro file while I was developing on a mac INCLUDEPATH += . /opt/local/include/ImageMagick LIBS += -L/opt/local/lib -lMagick++ When I add this to my .pro

How can I detect boxes in an image and pull them out as individual files?

一世执手 提交于 2019-12-21 21:39:23
问题 I need a programmatic way of taking a scanned image (let's assume PNG or any other convenient image format) and breaking it up into many smaller images. The scanned image is a grid, and the boxes of the grid will always be the same size and in the same relative location. Because the image is scanned, they are not necessarily in the same absolute location. In each box is a character, ideally I'd like to save the character as its own image file, without any of the box border. I prefer PHP and

Crop circular image with dragonfly rails

你说的曾经没有我的故事 提交于 2019-12-21 21:38:04
问题 I'm using dragonfly ~> 0.9.15 Given an image, I'm confused at how to use the convert method in dragonfly to crop a circular portion from the image with transparent background. I am able to use a direct image magick command to run it from command line but the example command I found uses actual files and I'm unaware of how to get the file while dragonfly processes it on the fly. Here's the actual command I took from a stack overflow question with imagemagick. https://stackoverflow.com/a/999563

Ruby graphic libraries

半城伤御伤魂 提交于 2019-12-21 20:37:33
问题 What's the difference between RMagic, ImageMagick, GD, etc. and which one should I use? I was looking for a thumbnail generation script and noticed that every script I found uses a different library for the same thing. 回答1: Imagemagick, GD, DevIL, and GraphicsMagick are libraries used to create and edit image files. RMagick is a ruby wrapper around ImageMagick/GraphicsMagick. You may find other wrappers I've had luck installing and configuring GraphicsMagick (similar to ImageMagick) and using

Paperclip w/ Imagemagick, Amazon S3 and Heroku - Imagemagick & S3 work, but the Paperclip fields don't get set in database. Works fine in dev

蓝咒 提交于 2019-12-21 20:25:44
问题 I'm using Paperclip with Imagemagick in my app, using Amazon S3 for storage. Everything works fine in development. But in production on Heroku it's not working correctly. The image gets uploaded to Amazon S3, and the thumbnail creation works, so that part of the Paperclip, Imagemagick and S3 combo is working ok. But for some reason, the Paperclip specific model fields are not getting filled: imagestore_file_name: imagestore_content_type: imagestore_file_size: imagestore_updated_at: In