ImageMagick

Convert 32 bit png to 8 bit png with ImageMagick by preserving semi transparent pixels

早过忘川 提交于 2020-01-01 02:31:13
问题 I want to convert 32 bit png to 8 bit png with ImageMagick, but semi transparent pixels are lost. How to solve this problem? The command that I am using is the following convert original.png PNG8:output.png 回答1: Apparently, even though the PNG format actually allows any and all of the colors in an 8-bit indexed color PNG to be fully or partially transparent, ImageMagick's "PNG8" format specifier only supports GIF-style 1-bit transparency. It's possible to produce indexed 8-bit PNGs using

Bundle ImageMagick library with OS X App?

左心房为你撑大大i 提交于 2019-12-31 22:35:14
问题 I am developing an OS X application, and would like to use ImageMagick to do some image manipulation. I have noticed that the CLI ImageMagick utilities require some environment variables to work. Is it possible to bundle the ImageMagick suite of tools with my application and use them in my code? 回答1: So here is my solution: I bundled the OS X binary release with my project, and used an NSTask to call the binaries. You need to specify the "MAGICK_HOME" and "DYLD_LIBRARY_PATH" environment

How is a sepia tone created?

大城市里の小女人 提交于 2019-12-31 17:23:56
问题 What are the basic operations needed to create a sepia tone? My reference point is the perl imagemagick library, so I can easily use any basic operation. I've tried to quantize (making it grayscale), colorize, and then enhance the image but it's still a bit blurry. 回答1: Sample code of a sepia converter in C# is available in my answer here: What is wrong with this sepia tone conversion algorithm? The algorithm comes from this page, each input pixel color is transformed in the following way:

ImageMagick vs GD - which is faster, less resource intensive and produces better images?

时光总嘲笑我的痴心妄想 提交于 2019-12-31 11:04:08
问题 I need to choose between either ImageMagick or GD library for the following image manipulation tasks: resizing images into multiple sizes watermarking images As you can see I don't need anything fancy. I'm sure both these tools can achieve them, so if one has more extra features than the other, I don't really care about. My main concern is performance and quality. Which of these 2 tools consumes less resources, is faster and produces better quality images? P.S. I need to use it with their

Besides standard/progressive, the 3rd kind of JPEG compression: load by channel?

一曲冷凌霜 提交于 2019-12-31 10:44:25
问题 this question might be an "Open Question" and many of you might be eager to close it, but please don't. Let me explain. As we all know, JPEG has two kinds of compression (at least in Photoshop save dialog) optimized, where image was loaded kinda like line-by-line progressive, where image was loaded first mosaic-like, the progressively better till the original resolution I have read a lot of PNG/JPEG optimization articles before, but now I encountered this awesome third kind compression, from

How to convert a JPEG image into SVG format using ImageMagick?

蓝咒 提交于 2019-12-31 08:08:51
问题 How to convert a JPEG image into SVG format using ImageMagick? 回答1: you'll need to use potrace and convert to a bitmap first. $convert input.jpg output.ppm $potrace -s output.ppm -o svgout.svg 回答2: Actually, with a complete installation of a recent version of ImageMagick it should be as easy as: convert some.jpeg some.svg Of course, ImageMagick cannot do it all by itself -- it uses delegates (helper programs) to handle SVG input or output. (This has been pointed out by other answers already.)

Extract layers from PSD with ImageMagick, preserving layout

烈酒焚心 提交于 2019-12-31 08:03:46
问题 I'm using ImageMagick to extract layers from a PSD, and it gets them all out fine with: convert image.psd image-%d.png But the resulting PNG images are of varying dimensions, depending on the actual contents of the layer. What I'd like is to extract all the layers, but have them all the same size, so that I can easily lay them on top of each other later, and have everything line up just as it did in the original PSD. If it helps to visualise it, this is what I'm currently getting with the

how to convert series of jpegs to flv using imagemagik and php?

旧时模样 提交于 2019-12-31 07:12:15
问题 I have series of jpegs , i want to make flv or mpg from all the images . How can i do it with using imagemagik and php . exec(convert image1.jpg image2.jpg one.flv) make blank flv 回答1: Well I would jump stright into using ffmpeg. You can also do it using ImageMagick; however the docs state you need ffmpeg installed, so why have the middleman? I haven't tested this, fair warning. /* cmd img series codec bitrate framerate optional -s WidthxHeight and output filename */ exec(ffmpeg -f image2 -i

Converting colors (not images) with ImageMagick

时光总嘲笑我的痴心妄想 提交于 2019-12-31 05:30:14
问题 More specifically, I'd like to accurately convert a CMYK value (probably from the ISO Coated v2 space) to an RGB value (probably from the sRGB space) on the Ruby platform (probably using ICC profiles). ImageMagick seemed like a good place to start, but I've also heard that LittleCMS might have been ported/wrapped to work with Ruby . Once again, I'm looking to convert single colors, NOT image files. Any ideas? 回答1: In ImageMagick, you can do the following: convert xc:"cmyk(0,255,255,0)"

paperclip gem validation error - 'filename' is not recognized by the 'identify' command

北城余情 提交于 2019-12-31 05:17:08
问题 I'm trying to get the paperclip gem to upload images on my production server (ubuntu 12.0.4, apache2, phusion passenger and rvm) and for each attachment I get three lots of this validation error: Img one /tmp/villa-0520121006-4333-hdo9wv.jpeg is not recognized by the 'identify' command. ImageMagick is installed properly, as is the libmagickwand-dev package, Rmagick and paperclip. And I've set the correct command_path to where identify and convert are located in my production.rb config file.