imagemagick-convert

How to place a GIF on another GIF with ImageMagick, where both GIFs are of different sizes

╄→尐↘猪︶ㄣ 提交于 2020-05-15 06:37:07
问题 I have two GIFs of different sizes. I want to be able to place one animated GIF onto a static background GIF at a specific location and at the same time add text to the result. I am new to ImageMagick world, please help. I am trying to achieve the following result where dog sticker is in a separate GIF. 回答1: If your two animations do not have the same delay and number of frames, see https://www.imagemagick.org/Usage/anim_mods/#merging. If your animations have the same delay and number of

Why doesn't my Imagemagick convert consider the loop parameter?

丶灬走出姿态 提交于 2020-01-17 12:31:11
问题 I'm using this command: convert -delay 10 -loop 1 -density 300 myfile.pdf myfile.gif on Windows 10 and all works well except for the loop parameter: even if I set it to 1 , I always get an infinite loop. What am I doing wrong? 回答1: I did some experiments varying the -loop parameter from 0 through 3 and using a simple red frame followed by a blue frame as follows: for i in 0 1 2 3; do echo i=$i ((d=80+i)) convert -delay $d -loop $i -size 256x256 xc:red xc:blue a.gif identify -verbose a.gif |

Why doesn't my Imagemagick convert consider the loop parameter?

a 夏天 提交于 2020-01-17 12:28:59
问题 I'm using this command: convert -delay 10 -loop 1 -density 300 myfile.pdf myfile.gif on Windows 10 and all works well except for the loop parameter: even if I set it to 1 , I always get an infinite loop. What am I doing wrong? 回答1: I did some experiments varying the -loop parameter from 0 through 3 and using a simple red frame followed by a blue frame as follows: for i in 0 1 2 3; do echo i=$i ((d=80+i)) convert -delay $d -loop $i -size 256x256 xc:red xc:blue a.gif identify -verbose a.gif |

Imagemagick svg to png conversion screws up text position

一曲冷凌霜 提交于 2020-01-16 17:04:12
问题 Trying to use Imagemagick's conversion tool to do basic SVG to PNG conversions, but the text positions are completely out of whack. For example, here's a vertical list of words in SVG: SVG: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="360" height="360" version="1.1" style="display:block;"> <rect width="100%" height="100%" fill="#FFFF00"/> <text x="0" y="20" font-size="12" text-anchor="start" fill="black" transform="">HELLO</text> <text x="0" y="40"

Imagemagick svg to png conversion screws up text position

空扰寡人 提交于 2020-01-16 17:03:10
问题 Trying to use Imagemagick's conversion tool to do basic SVG to PNG conversions, but the text positions are completely out of whack. For example, here's a vertical list of words in SVG: SVG: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="360" height="360" version="1.1" style="display:block;"> <rect width="100%" height="100%" fill="#FFFF00"/> <text x="0" y="20" font-size="12" text-anchor="start" fill="black" transform="">HELLO</text> <text x="0" y="40"

imagemagick: append a label under image with font size

六月ゝ 毕业季﹏ 提交于 2020-01-16 01:06:30
问题 How to append a label under an image with a font size? convert image.png -label "Test label" -pointsize 100 -gravity center -append image.png 回答1: Like this: convert image.png -pointsize 36 label:"Test label" -gravity center -append result.png When you use xc: , label: , pattern: and gradient: (i.e. all the ones with no dash at the start and a colon at the end), ImageMagick creates a canvas for you to put the data on. 来源: https://stackoverflow.com/questions/33942892/imagemagick-append-a-label

ImageMagick PATH not being recognized with engine = “tikz” in knitr

做~自己de王妃 提交于 2020-01-15 06:14:27
问题 I am trying to compile TikZ graphics from knitr . I am using the example available here. I am specifically trying to knit from Rstudio. The output I get from the "R Markdown" tab is as follows: processing file: test.Rmd Invalid Parameter - /test_files Quitting from lines 16-31 (test.Rmd) Error in (knit_engines$get(options$engine))(options) : problems with `convert`; probably not installed? Calls: <Anonymous> ... process_group.block -> call_block -> block_exec -> in_dir -> <Anonymous>

Detect if image is grayscale or color using Imagick

a 夏天 提交于 2020-01-13 02:46:09
问题 I'm attempting to try and assign a value to an image based on its 'saturation level', to see if the image is black and white or color. I'm using Imagick, and have found what seems to be the perfect code for the command line and am trying to replicate it using the PHP library. I think I understand the concept: Convert image to HSL. Extract the 'g' channel (which is the S channel in HSL). Calculate the mean of this channel. Command line code convert '$image_path' -colorspace HSL -channel g

Imagick not reflects the gravity once it is set

喜你入骨 提交于 2020-01-06 07:16:06
问题 I am trying to translate the following piece of Imagemagick command line code convert tmpI.mpc -gravity center -crop ${ww}x${hc}+0+0 +repage as follows $tmpIC->setGravity(imagick::GRAVITY_CENTER); $tmpIC->cropImage($ww, $hc, 0, 0); $tmpIC->setImagePage($tmpIC->getImageWidth(), $tmpIC->getImageHeight(), 0, 0); but setting or not setting the gravity makes no difference. Please tell me what is wrong with the piece of code I have Width and Height of the image before cropping are tmpIC-

Converting colorspace in Imagemagick is not working

旧城冷巷雨未停 提交于 2020-01-05 03:25:29
问题 I am trying to convert an sRGB bitmap file to greyscale using ImageMagick. I've tried using convert -set colorspace Gray and convert colorspace Gray , which according to the documentation should do it. However, when I try to check the output file using identify -format "%[colorspace]" <outputfile> it still tells me that it is in sRGB. I am aware that not all file formats support all colourspaces, and tried converting the bitmap to a png first, then changing the colorspace and converting it