Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How automate crops of an image
#15
ImageMagick (IM) command line in a terminal still widely used.

Quote:..I can run "magick wide.png win:

If that works then you are using IM version 7 Is this in linux or Windows ? Obvously bash for linux, you need an equivalent bat file for Win. I am really rusty with Windows batch when it comes to loops. For IM 7 exchange magick for convert (convert is also a Windows command that plagues Windows users)

Quote:When I enter this line:
$ convert wide.png -crop 750x100+$i+0 +repage "%02d"$i.png
it gives me the error:
Invalid Parameter - -crop

The i of course comes from the loop. Not there so you get an error. The syntax is
magick image -crop WIDTHxHEIGHT+XOFFSET+YOFFSET +repage croppedimage

Your single command, for the first image

$ convert wide.png -crop 750x100+0+0 +repage "%02d"0.png

edit: for Windows thatshould be $ magick wide.png -crop 750x100+0+0 +repage 0.png (how to leading zeros in windows ??? - do not know)

The "%02d" pads out the name with leading zeros. I assume your set of 125 (or so) images are destined for an animation (or similar) and need regular numbering. Tried and I know it works.

How are you getting on with ofnuts plugin?

@ Ofnuts crop , recent, I do not think so http://www.imagemagick.org/Usage/crop/
Reply


Messages In This Thread
How automate crops of an image - by stevem0 - 08-12-2020, 01:24 AM
RE: How automate crops of an image - by Ofnuts - 08-12-2020, 08:35 AM
RE: How automate crops of an image - by stevem0 - 08-12-2020, 02:20 PM
RE: How automate crops of an image - by Kevin - 08-12-2020, 02:47 PM
RE: How automate crops of an image - by denzjos - 08-12-2020, 02:49 PM
RE: How automate crops of an image - by stevem0 - 08-12-2020, 03:58 PM
RE: How automate crops of an image - by Ofnuts - 08-12-2020, 04:11 PM
RE: How automate crops of an image - by stevem0 - 08-12-2020, 03:23 PM
RE: How automate crops of an image - by Ofnuts - 08-12-2020, 03:46 PM
RE: How automate crops of an image - by stevem0 - 08-12-2020, 04:48 PM
RE: How automate crops of an image - by rich2005 - 08-12-2020, 06:24 PM
RE: How automate crops of an image - by stevem0 - 08-13-2020, 04:08 AM
RE: How automate crops of an image - by Ofnuts - 08-13-2020, 06:49 AM
RE: How automate crops of an image - by stevem0 - 08-13-2020, 11:51 AM
RE: How automate crops of an image - by stevem0 - 08-12-2020, 08:05 PM
RE: How automate crops of an image - by rich2005 - 08-13-2020, 07:04 AM
RE: How automate crops of an image - by rich2005 - 08-13-2020, 12:46 PM
RE: How automate crops of an image - by stevem0 - 08-13-2020, 08:58 PM

Forum Jump: