Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Rye wrote: ↑2018-10-27T01:09:04-07:00how could I arrange multiple of these (named 001.png 002.png ... etc) [...] using only imagemagick ?
Assuming you're in the directory containing the input images and that they're in the order you want them to appear in the output, a command like this would accomplish that task...
Ah nice !
Supposing I'd change from say 12 to maybe 36 or perhaps 48 dashes:
Can your code be simply adapted to that ?
Also, out of curiosity: What is a "virtual pixel" ?
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
Rye wrote: ↑2018-10-27T07:47:32-07:00Supposing I'd change from say 12 to maybe 36 or perhaps 48 dashes: Can your code be simply adapted to that ?
That FX expression "%[fx:t*360/n]" tells IM to rotate each input image in the list, designated by the "t", multiplied by 360 degrees divided by "n", the number of images in the list. It will still evenly rotate the images even if adding more images to the list. Learn more about FX expressions at THIS link.
If you're using the same image multiple times, you can read it in once then duplicate it as many times as necessary.
Also, out of curiosity: What is a "virtual pixel" ?
When you rotate something there will be some areas outside the image that will come into view. The virtual-pixel setting instructs IM on how to handle those pixels. Learn more about it at THIS link.
Strange though however,
upon executing the command I get:
magick: invalid list of numbers '-distort' 't*360/nl]' at CLI arg 10 @ error/operation.c/LISimpleOperatorImage/2257
Nevermind, my mistake, your command needs the "%" escaped inside a bat file.
Works now. Perfect!
Version: ImageMagick-7.0.7-28-Q16-x64-static http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
Rye wrote: ↑2018-10-29T01:17:07-07:00If I for example had a horizontal picture and wanted to bend it to a circle, like this:
This example command starts by creating a red-to-yellow gradient image 400 pixels wide by 20 pixels high. Then it adds a transparent border to the top and bottom. Then it uses a version of "-distort" to bend it into a circle...
These distort operations are very versatile and can get pretty complex, so you have to be careful of your virtual-pixel settings, background color, border color, etc., to make sure you get the results you want.
Learn more about using the "-distort" operator to make arcs and circles at THIS link. Look a bit further down that page for instructions on "-distort polar" which can also be used to bend images into circles.
Hmm...
for %%x in (*.png) do magick %%x -distort arc 360 %%x_out.png
creates a "globe like" sphere,
How can I modify its inner part to be empty however ? Also, is there a way to force it to use a predefined canvas size ? (as far a possible)
Rye wrote: ↑2018-10-29T05:50:20-07:00How can I modify its inner part to be empty however ? Also, is there a way to force it to use a predefined canvas size ? (as far a possible)
There are additional arguments to the "-distort arc" operator that let you specify the inside and/or outside dimensions of the result. You can find that on the page I linked.
Just out of curiosity: Could Imagemagick *in theory* also "un-distort* an image back from a circle to a horizontal line ?
Well, sort of. Again, the page I linked shows how to use "-distort polar" and "depolar". That might get you part way there with varying quality of results.