imagemagick-convert

ImageMagick: Why won't this text expand to fill?

大憨熊 提交于 2019-12-13 05:07:23
问题 I'm reading the text handling docs for label and it seems if I specify -size it should magically get as big as possible to fill the space. I want to make it so this text gets as big as possible. I will set the \n characters myself in the title (if absolutely necessary). I'd rather the \n get calculated automatically, but it seems label is what makes it the biggest possible (but doesn't support automatic \n ), while caption will add \n where appropriate (but doesn't support a dynamic size

Imagick Equivalent Of This Imagemagick Command?

房东的猫 提交于 2019-12-13 04:26:59
问题 I'm trying to create a vignette effect, and I can get desired result through command line. But when I try it with Imagick, I'm not getting the desired result convert i.jpg ( -size 150x150 radial-gradient:black-white -gravity center -crop 100x100+0+0 +repage ) -compose multiply -flatten o.jpg I tried the following Imagick commands $gra = new Imagick(); $gra->newPseudoImage(150, 150, "radial-gradient:black-white"); $gra->cropThumbnailImage(100, 100); $gra->setImagePage(100, 100, 0, 0); $img =

Montage / Join 2 TIFF images in a 2 col x 1 row tile without losing quality

倖福魔咒の 提交于 2019-12-13 03:22:26
问题 I have 2 same size, dimensions, and resolution images in TIFF (6400x6400 pixels, 800x800 ppi). The files are 18.7MB and 27.0MB, they were created with R's tiff() with compression="lzw" . When I try to create a tile using montage -compress lzw -tile 2x1 -geometry +0+0 Figure4L.tiff Figure4R.tiff Figure4.tiff I get a file 12800x6400 TIFF which has a size of 12.8 MB, GIMP reports a resolution of 72 x 72 ppi. GIMP also reports "Warning:The image you are loading has 16 bits per channel. GIMP can

Graphicsmagick gives higher filesize when compressing jpg

喜你入骨 提交于 2019-12-12 05:37:03
问题 First i took lena512color.tiff amd converted it to jpg and then i ran mogrify on it with a quality of 90%.Surprising after i decrease the quality filesize is higher.What am I doing wrong here ? gm convert lena512color.tiff lena512color.jpg # filesize = 37,043 gm mogrify -quality 90 lena512color.jpg # filesize = 58,132 回答1: By default, the output quality is set to whatever GraphicsMagick thinks the quality of the input file is. So I guess it thinks the TIFF's quality is lower than 90 and you

Batch convert PNGs to individual PDFs while maintaining deep folder hierarchy in bash

不问归期 提交于 2019-12-12 03:46:20
问题 I've found a solution that claims to do one folder, but I have a deep folder hierarchy of sheet music that I'd like to batch convert from png to pdf. What do my solutions look like? I will run into a further problem down the line, which may complicate things. Maybe I should write a script? (I'm a total n00b fyi) The "further problem" is that some of my sheet music spans more than one page, so if the script can parse filenames that include "1of2" and "2of2" to be turned into a single pdf, that

How can I use imagemagick attributes in the draw rectangle command?

Deadly 提交于 2019-12-12 03:44:25
问题 I am trying to draw a rectangle across the full width of an image with convert [1]. I am trying to use ImageMagick Attributes to accomplish this. The command I use is this: convert ImageFile -fill black -stroke black -draw "rectangle 0,0 %[w],42" ImageFileNew The Output I get is: convert: NonconformingDrawingPrimitiveDefinition `rectangle' @ error/draw.c/DrawImage/3271. With debug: convert ImageFile -fill black -stroke black -draw "rectangle 0,0 %[w],42" ImageFileNew I get: 2016-07-27T14:55

Imagemagick parallel conversion

*爱你&永不变心* 提交于 2019-12-11 20:45:38
问题 I want to get screenshot of each page of a pdf into jpg . To do this I am using ImageMagick 's convert command in command line. I have to achieve the following - Get screenshots of each page of the pdf file. resize the screenshot into 3 different sizes (small, med and preview). store the different sizes in different folders (small, med and preview). I am using the following command which works, however, it is slow. How can I improve its execution time or execute the commands parallely.

draw grid with cells of specific size over an image

给你一囗甜甜゛ 提交于 2019-12-11 17:06:19
问题 How can I draw a grid, 1px black borders no fill, over an image? Each section of the grid should be 480x360px. E.g., given this 1440x1080px solid white input: It should have a 3x3 grid drawn onto it (because 9 480x360px rectangles fit into it) to make an output kind of like this: That's not as accurate as I'd like the command to be (I was just drawing rectangles by eye), but I hope it illustrates what I'm after. 回答1: Here is a command that will read an input image, create a 480x360

How to export the layers of an eps file into seperate files

早过忘川 提交于 2019-12-11 16:33:04
问题 I have an eps file with multiple layers and I would like to have a command line tool that splits the eps file into seperate files (one file for each layer). The resulting files can be of either format (vector or raster). 来源: https://stackoverflow.com/questions/57753942/how-to-export-the-layers-of-an-eps-file-into-seperate-files

Imagemagick convert command for generating polygon is working in command line but not working in CentOS [duplicate]

本小妞迷上赌 提交于 2019-12-11 16:32:52
问题 This question already has answers here : Java Runtime Exec With White Spaces On Path Name (2 answers) Having spaces in Runtime.getRuntime().exec with 2 executables (1 answer) Closed 4 months ago . Any help is very valuable for me. I am trying to generate a polygon using imagemagick. I am passing imagemagick query to Runtime.getRuntime().exec(query) but its not working. Below is the detail of steps followed by me getting correct result executing below query directly in commandline in CentOS: