Thansk for your answer…
This works for me:
Code: Select all
convert 7296.jpg -crop 1024x1024 -set filename:tile "%[fx:page.y/1024]_%[fx:page.x/1024]" 0_%[filename:tile].jpg
No i need to resize all Images in a loop and than slice these Thumbnails:
Example:
Original.jpg = 7296x5472px
First i need to resize this full Image to:
5472px (75%)
3648px (50%)
1824px (25%)
912px (12,5%)
Every one of these thumbnails i need to slice in 1024X1024px.
My command for resizing so far:
I realized that the following command is very slow. Is there a faster approach?
Code: Select all
convert 7296.jpg \
\( +clone -resize 75% -write thumb_75.jpg +delete \) \
\( +clone -resize 50% -write thumb_50.jpg +delete \) \
\( +clone -resize 25% -write thumb_25.jpg +delete \) \
-resize 12.5% thumb_12_5.jpg
Next my current command doesn't realy work
Code: Select all
files=(thumb_*.jpg)
total=${#files[@]}
i=0
for f in "${files[@]}"; do
echo index $i
convert "$f" -crop 1024x1024 -set filename:tile "%[fx:page.y/1024]_%[fx:page.x/1024]" "$i"_%[filename:tile].jpg
i=$(( i + 1 ))
done
I want to loop the 4 files (5472px, 3648px, 1824px,912px) and i expect this result:
5472px:
0_0_1.jpg
0_0_2.jpg
...
next row:
0_1_1.jpg
0_1_2.jpg
...
3648px:
1_0_1.jpg
1_0_2.jpg
...
next row:
1_1_1.jpg
1_1_2.jpg
...
and so on...