Replies: 4 comments 1 reply
-
Each command is more complex than it needs to be. "-duplicate" and "+append" and "-append" would be useful to simplify the command. In addition, each command reads the input, rotates and resizes it twice. The command can be optimised so it does this only once. For v7, I suggest you use "magick", not "magick convert".
5a. You have a leading "%" in the output file, eg "%C:\Users...". What is that for? |
Beta Was this translation helpful? Give feedback.
-
Thank you snibgo So, I'm making progress with this (more than I have in the last two weeks anyway). Keyrings script:
Magnets Script:
Will have to do a lot more research on the duplicate, resize and append commands. Re the leading "%" - not sure how this was added, but is obviously superfluous. |
Beta Was this translation helpful? Give feedback.
-
Hi again. Sorry to bother you yet again. Experimenting, and so far have come up with the following amendments (with help from a little forum research): Keyrings Script:
Magnets Script:
which both appear to do what I want. Great and gets me moving along for now. A few questions left:
Thanks for helping me. |
Beta Was this translation helpful? Give feedback.
-
magick ^
|
Beta Was this translation helpful? Give feedback.
-
Hi.
Hope you can all help me!
Version: ImageMagick 7.0.8-33 Q16 x86 2019-03-10 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2018 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Visual C++: 180040629
Features: Cipher DPC Modules OpenMP
I have been using imagemagick to create tiled prints.
I have used it via a windows .bat file to quickly create an image that is 6x4 inch equivalent in pixels that have on them either 4 3x2 inch prints or 16 1.5x1 inch prints.
They need to be .bat files so that when I just drop a .jpg image on to it creates it for me as is has to be created quickly when I need it (customer waiting).
Keyrings-6x4-16on
magick convert ( %1 -rotate "-90>" -resize 300 -gravity NorthWest -extent 1200x1800 ) ( %1 -rotate "-90>" -resize 300 -write mpr:small ) -gravity NorthWest -geometry +300+0 -composite mpr:small -gravity NorthWest -geometry +600+0 -composite mpr:small -gravity NorthWest -geometry +900+0 -composite mpr:small -geometry +0+450 -composite mpr:small -geometry +300+450 -composite mpr:small -geometry +600+450 -composite mpr:small -geometry +900+450 -composite mpr:small -geometry +0+900 -composite mpr:small -geometry +300+900 -composite mpr:small -geometry +600+900 -composite mpr:small -geometry +900+900 -composite mpr:small -geometry +0+1350 -composite mpr:small -geometry +300+1350 -composite mpr:small -geometry +600+1350 -composite mpr:small -geometry +900+1350 -composite "%C:\Users\Kris\Desktop\ImageMagick\%~n1_Keyrings-6x4-16on.jpg"
Magnets-6x4-4on
magick convert ( %1 -rotate "-90>" -resize 600 -gravity NorthWest -extent 1200x1800 ) ( %1 -rotate "-90>" -resize 600 -write mpr:small ) -gravity NorthWest -geometry +600+0 -composite mpr:small -geometry +600+900 -composite mpr:small -geometry +0+900 -composite "%C:\Users\Kris\Desktop\ImageMagick\%~n1_Magnets-6x4-4on.jpg"
THis has worked out for me well so far. My questions are:
Am I doing this right or is there an easier methodology? I think the original was created some time ago and not by me, but has been amended.
Can I create a single 1200x1800 pixel image that has 2 900x600 pixel (i.e. 3x2 inch) images on one half and 8 450x300 (1.5x1 inch) images on the other half?
If so, is it possible to create even more complex patterns, perhaps a 2700x1800 (i.e. 9x6 inch) image that has perhaps 1 1800x1200 (6x4 inch), 2 900x600 images and the rest with 450x300 perhaps?
Is is possible to leave a very slight white border around the outside of the completed image to compensate for the fact that my printer crops slightly from the edge?
Is it possible to code it such that the image is created in whatever folder the .bat script resides in? I have to use a particular folder as above in the code, but if it could automatically default to the same folder it would help me enormously.
Sorry for the long winded questions! I'm learning rapidly!
Thanks for any advice.
Kris
Beta Was this translation helpful? Give feedback.
All reactions