Search found 15 matches

by darkfrei
2018-11-14T11:28:32-07:00
Forum: Users
Topic: Resize-bend-resize script
Replies: 6
Views: 7651

Re: Resize-bend-resize script

Another question, but for the same project: How to make from one image a lot of them but with shift? By paint dot net it calls "panelling", but it's very big work. So I want to make from this picture 32x32: https://i.imgur.com/4dMiYTa.png this spritesheet with 32 elements, every sprite was...
by darkfrei
2018-11-13T13:36:45-07:00
Forum: Users
Topic: Resize-bend-resize script
Replies: 6
Views: 7651

Re: Resize-bend-resize script

Looks amazing! Exactly what I want. For 32 pixels here is distort "...320...".

Code: Select all

magick "Input/*.png" ^
 -scale 1000%% ^
 -background none ^
 -virtual-pixel none ^
 -distort arc "90 45 320 0" -shave 1 ^
 -scale 10%% ^
 Output/bend_90_%%04d.png
pause
by darkfrei
2018-11-13T10:53:35-07:00
Forum: Users
Topic: Resize-bend-resize script
Replies: 6
Views: 7651

Re: Resize-bend-resize script

This part is too complicated: magick image-02.png -background none ^ -gravity East -extent 400x200 ^ -virtual-pixel none -distort Arc 180 image-180.png Here I take image-02.png (200x200 px), add another 200 pixels on the left (west) side. But -distort makes this picture as 456x229 px :shock: https:/...
by darkfrei
2018-11-13T10:24:21-07:00
Forum: Users
Topic: Resize-bend-resize script
Replies: 6
Views: 7651

Re: Resize-bend-resize script

Thanks, GeeMack!

I've also found another link http://www.imagemagick.org/Usage/mapping/#circlar_arc and trying to undertand it.
by darkfrei
2018-11-13T09:16:15-07:00
Forum: Users
Topic: Resize-bend-resize script
Replies: 6
Views: 7651

Resize-bend-resize script

Hi all! I know how resize, but what tool I can use for bending? Now I need make a lot of images like that (magenta is for position): Original image for example https://i.imgur.com/mP0BmCN.png image-01.png Resize to 200x200 https://i.imgur.com/HnvvwGP.png image-02.png (200x200 px) Bend this image to ...
by darkfrei
2018-01-17T14:39:30-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Re: Crop sprites for minimal spritesheet size

Thanks GeeMack, it works just perfect! magick "Input/*.png" -background none ^ ( -clone 0--1 -layers merge ^ -set option:cropper "%%[@]" +delete ) ^ -crop %%[cropper] +repage ^ MIFF:- | magick montage MIFF:- -background none ^ -tile 2x2 -geometry +0+0 Output\best_spritesheet_2x2....
by darkfrei
2018-01-17T14:07:30-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Re: Crop sprites for minimal spritesheet size

ImageMagick>magick convert "Input\*.png" -background rgba(0,0,0,0) ( -clone 0--1 -layers merge -set option:cropper "[@]" +delete ) -crop [cropper] +append Output\cropped_GeeMack.png convert: invalid argument for option '-crop': [cropper] @ error/convert.c/ConvertImageCommand/120...
by darkfrei
2018-01-17T13:49:08-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Re: Crop sprites for minimal spritesheet size

Your red image is 256x256. Is that correct for what you want? My red image is a mask, where all alpha borders are marked as red, but it's 0,0,0,255. You cant see alpha channel and I'm just marked it. How do you know where to put the trimmed flattened images (in white) inside the red larger 256x256 ...
by darkfrei
2018-01-17T13:17:33-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Re: Crop sprites for minimal spritesheet size

Output spritesheet is exact 336x238: two times wider and two times higher than mask after cropping. What problems did you encounter when you tried my suggestion above? ImageMagick>magick convert "Input\*.png" -background rgba(0,0,0,0) ( -clone 0--1 -layers merge -set option:cropper "...
by darkfrei
2018-01-17T12:59:21-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Re: Crop sprites for minimal spritesheet size

I want to get just one script. This script takes sprites and makes a mask, from this mask we can get how big alpha borders we have. This alpha borders are marked here as red: https://i.imgur.com/Vz3DioV.png If we have this alpha borders, it will be very easy to crop all previous sprites with the sam...
by darkfrei
2018-01-17T10:58:18-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Re: Crop sprites for minimal spritesheet size

You are making nice spritesheet with perfect grid with same sprites. It's not a problem for me too. I'm using ImageMagick-7.0.5-4-portable-Q16-x64 (it's portable version) and all commands without "magick" are working great. I have another example. I have a spritesheet 2x2 with sprites 256x...
by darkfrei
2018-01-16T16:33:10-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Re: Crop sprites for minimal spritesheet size

This code

Code: Select all

montage "Input/*.png" -trim +repage -geometry +0+0 -tile 8x -background none spritesheet_8x_128b.png
makes not-same-dimension-spritesheet:
Image

So must it be:
Image
by darkfrei
2018-01-16T16:23:35-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Re: Crop sprites for minimal spritesheet size

If I put all my sprites together, it looks like: https://i.imgur.com/thJZ30m.png As you see, here is a lot free space, while all sprites have same dimension: 256x256 pixels. So, if I make only one spritesheet, it will be 4096x4096. It's too much. I want to cut (or crop) all sprites so, that they hav...
by darkfrei
2018-01-16T13:47:08-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Re: Crop sprites for minimal spritesheet size

As you can see, dimension of the cropped spritesheet is much less.
Image and Image
by darkfrei
2018-01-16T13:40:59-07:00
Forum: Users
Topic: Crop sprites for minimal spritesheet size
Replies: 19
Views: 24569

Crop sprites for minimal spritesheet size

Hi all! I have some sprites, for example 128x128 (or 256x256) pixels. https://i.imgur.com/1IcgDaQ.png If I have 8 sprites, I can make this spritesheet with only one command: montage "Input_Folder/*.png" -geometry +0+0 -tile 8x -background rgba(0,0,0,0) -quality 100% Output_Folder\spriteshe...