Split Image in 2. Then apply other commands. Stack problem?
Posted: 2017-07-29T09:45:12-07:00
Hi to all
Imagemagick 6.9.3.-7 Q16 x64 on Windows 7 x64
I'm trying to split an image in 2 (-crop), then on the first part apply a rotate and a trim. I'm having trouble with this. There's something in my logic, I can't seem to apply the commands in isolation.
If I do the following and get the following information
"identify -crop 2816x4344 C:\AsFarpas\AsFarpas+00000032.tif"
C:\AsFarpas\AsFarpas+00000032.tif[0] TIFF 6314x4346=>2816x4344 6314x4346+0+0 8-b
it Grayscale Gray 0.265u 0:00.139
C:\AsFarpas\AsFarpas+00000032.tif[1] TIFF 6314x4346=>2816x4344 6314x4346+2816+0
8-bit Grayscale Gray 0.172u 0:00.100
C:\AsFarpas\AsFarpas+00000032.tif[2] TIFF 6314x4346=>682x4344 6314x4346+5632+0 8
-bit Grayscale Gray 0.125u 0:00.059
C:\AsFarpas\AsFarpas+00000032.tif[3] TIFF 6314x4346=>2816x2 6314x4346+0+4344 8-b
it Grayscale Gray 0.094u 0:00.049
C:\AsFarpas\AsFarpas+00000032.tif[4] TIFF 6314x4346=>2816x2 6314x4346+2816+4344
8-bit Grayscale Gray 0.125u 0:00.059
C:\AsFarpas\AsFarpas+00000032.tif[5] TIFF 6314x4346=>682x2 6314x4346+5632+4344 8
-bit Grayscale Gray 0.125u 0:00.059
I tried this.
"convert C:\AsFarpas\AsFarpas+00000032.tif +repage -crop 2816.572185751581x4346 +repage -delete 2-20"
I discard parts 2 to 5.
Then I wanted to apply the following in isolation to C:\AsFarpas\AsFarpas+00000032.tif[0] and save
" -background black -rotate 0.5 -bordercolor black -border 1x1 -fuzz 80% -trim +repage -shave 0x20 -crop +60+0 -crop -100+0 +repage
-write c:\brunoout\UMALINHA_A.tif
Then I wanted to apply the following in isolation to C:\AsFarpas\AsFarpas+00000032.tif[1] and save
"-background black -rotate -0.5625 -bordercolor black -border 1x1 -fuzz 80% -trim +repage -shave 0x20 -crop +100+0 -crop -60+0 +repage ^
-write c:\brunoout\UMALINHA_B.tif
I've tested all the results individually and they are ok. I wanted to incorporate this into only one command line.
Thanks
Imagemagick 6.9.3.-7 Q16 x64 on Windows 7 x64
I'm trying to split an image in 2 (-crop), then on the first part apply a rotate and a trim. I'm having trouble with this. There's something in my logic, I can't seem to apply the commands in isolation.
If I do the following and get the following information
"identify -crop 2816x4344 C:\AsFarpas\AsFarpas+00000032.tif"
C:\AsFarpas\AsFarpas+00000032.tif[0] TIFF 6314x4346=>2816x4344 6314x4346+0+0 8-b
it Grayscale Gray 0.265u 0:00.139
C:\AsFarpas\AsFarpas+00000032.tif[1] TIFF 6314x4346=>2816x4344 6314x4346+2816+0
8-bit Grayscale Gray 0.172u 0:00.100
C:\AsFarpas\AsFarpas+00000032.tif[2] TIFF 6314x4346=>682x4344 6314x4346+5632+0 8
-bit Grayscale Gray 0.125u 0:00.059
C:\AsFarpas\AsFarpas+00000032.tif[3] TIFF 6314x4346=>2816x2 6314x4346+0+4344 8-b
it Grayscale Gray 0.094u 0:00.049
C:\AsFarpas\AsFarpas+00000032.tif[4] TIFF 6314x4346=>2816x2 6314x4346+2816+4344
8-bit Grayscale Gray 0.125u 0:00.059
C:\AsFarpas\AsFarpas+00000032.tif[5] TIFF 6314x4346=>682x2 6314x4346+5632+4344 8
-bit Grayscale Gray 0.125u 0:00.059
I tried this.
"convert C:\AsFarpas\AsFarpas+00000032.tif +repage -crop 2816.572185751581x4346 +repage -delete 2-20"
I discard parts 2 to 5.
Then I wanted to apply the following in isolation to C:\AsFarpas\AsFarpas+00000032.tif[0] and save
" -background black -rotate 0.5 -bordercolor black -border 1x1 -fuzz 80% -trim +repage -shave 0x20 -crop +60+0 -crop -100+0 +repage
-write c:\brunoout\UMALINHA_A.tif
Then I wanted to apply the following in isolation to C:\AsFarpas\AsFarpas+00000032.tif[1] and save
"-background black -rotate -0.5625 -bordercolor black -border 1x1 -fuzz 80% -trim +repage -shave 0x20 -crop +100+0 -crop -60+0 +repage ^
-write c:\brunoout\UMALINHA_B.tif
I've tested all the results individually and they are ok. I wanted to incorporate this into only one command line.
Thanks