ren *.bmp *.bm2
mogrify -flop *.bm2
mogrify -rotate 270 *.bm2
mogrify.exe -format %02d.bmp -crop 32x32 *.bm2
del *.bm2 (optional)
mogrify -rotate 90 *.bmp
mogrify -flop *.bmp
montage -geometry +0+0 -tile 100x1 *.bmp out.bmp
I have problems doing this in a batch file, because in this command
mogrify.exe -format %02d.bmp -crop 32x32 *.bm2
The % simbol not work in batch file, if someone can fix this problem
Estou tentando seguir esse primeiro exemplo desse site abaixo e o texto acima foi tirado de outro site!nem no pronpt eu acertei fazer a linha 4
http://www.theelf-megadev.com/tut1d.htm
Sorry i am ultranoob!!!
as imagens estão no C:\imagens
Cut big images in small ones for sprites
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Cut big images in small ones for sprites
I do not think mogrify allow -format to have anything but the suffix such as -format bmp. -format tells mogrify what format to use for output. Mogrify only processes one output per input. So you cannot get images such a from a multiple crop.
So you need to write a script loop over each image and use convert to process it into multiple output images from your crop command.
So you need to write a script loop over each image and use convert to process it into multiple output images from your crop command.
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Cut big images in small ones for sprites
In a Windows BAT fle, % signs that are not for environment variables must be doubled.
snibgo's IM pages: im.snibgo.com
Re: Cut big images in small ones for sprites
Voçe poderia testar e corrigir?fmw42 wrote:I do not think mogrify allow -format to have anything but the suffix such as -format bmp. -format tells mogrify what format to use for output. Mogrify only processes one output per input. So you cannot get images such a from a multiple crop.
So you need to write a script loop over each image and use convert to process it into multiple output images from your crop command.
Test and fix? i am noob
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: Cut big images in small ones for sprites
I tested and it does not work. I do not believe it can be fixed. It is not a bug. It is just the way mogrify works.
Re: Cut big images in small ones for sprites
fmw42 wrote:I tested and it does not work. I do not believe it can be fixed. It is not a bug. It is just the way mogrify works.
http://www.imagemagick.org/Usage/crop/#crop_tile
Eu acho que encontrei a solução.Olha esse exemplo! Vou ver se acerto!
Re: Cut big images in small ones for sprites
@echo offDark Side wrote:fmw42 wrote:I tested and it does not work. I do not believe it can be fixed. It is not a bug. It is just the way mogrify works.
http://www.imagemagick.org/Usage/crop/#crop_tile
Eu acho que encontrei a solução.Olha esse exemplo! Vou ver se acerto!
ren *.bmp *.bm2
mogrify -flop *.bm2
mogrify -rotate 270 *.bm2
ren *.bm2 *.bmp <-----------------
convert *.bmp -crop 32x32 %02d.bmp <-----------------
mogrify -rotate 90 *.bmp
mogrify -flop *.bmp
montage -geometry +0+0 -tile 100x1 *.bmp out.bmp <------------- Falta corrigir esse calculo.A imagem do Earthquake junta sai diferente do site!
cmd