Hi everyone, I installed ImageMagick for Terminal on Mac and I am wondering how I can split my image into uneven pieces, and create a new file for each piece?
No, I am not going to release this copyrighted image in my game, its just for experimentation.
How to split image into uneven parts?
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to split image into uneven parts?
Please always provide your IM version and platform, since syntax and scripting may differ.
How does one know where to split these, since especially some overlap horizontally?
If there is not a clean separation, then you likely will have to do that manually using the -crop operator. See http://www.imagemagick.org/Usage/crop/#crop
How does one know where to split these, since especially some overlap horizontally?
If there is not a clean separation, then you likely will have to do that manually using the -crop operator. See http://www.imagemagick.org/Usage/crop/#crop
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to split image into uneven parts?
Code: Select all
convert 83596.png -alpha extract -scale x1! -fill White +opaque Black a.png
snibgo's IM pages: im.snibgo.com
Re: How to split image into uneven parts?
IM Version @6.9.8-3_0+x11, Platform OS X El Capitan, 10.11.6
Re: How to split image into uneven parts?
@snibgo, What's 83596.png and a.png supposed to represent?
This is my first time using ImageMagick.
This is my first time using ImageMagick.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: How to split image into uneven parts?
The input and output images, respectively.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: How to split image into uneven parts?
As Fred says. The file you uploaded has been renamed 83596.png by that website.
If you know the x-coordinates of your cut positions or the width of the pieces, you can just do a number of "-crop" operations. Five of the cut points can be found automatically (eg by my guillotine.bat script). If you crop off the "Sprites ripped by..." text, it finds them all.
If you know the x-coordinates of your cut positions or the width of the pieces, you can just do a number of "-crop" operations. Five of the cut points can be found automatically (eg by my guillotine.bat script). If you crop off the "Sprites ripped by..." text, it finds them all.
snibgo's IM pages: im.snibgo.com