Autocrop without knowledge of imagesize

Discussions on NConvert - the command line tool for image conversion and manipulation

Moderators: helmut, XnTriq, xnview

Post Reply
TN

Autocrop without knowledge of imagesize

Post by TN »

I want to auto-crop/auto-tile a large image into e.g. 4x4 smaller images (puzzles) in batch-mode. How to use nconvert?
The problem is that I dont now the origin imagesize.
Thoralf
User avatar
xnview
Author of XnView
Posts: 46236
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Autocrop without knowledge of imagesize

Post by xnview »

TN wrote:I want to auto-crop/auto-tile a large image into e.g. 4x4 smaller images (puzzles) in batch-mode. How to use nconvert?
The problem is that I dont now the origin imagesize.
Thoralf
Sorry it's not possible...
Pierre.
taiSon

it IS possible!

Post by taiSon »

Code: Select all

@echo off
.\PROGRAMME\nconvert.exe -quiet -out jpeg -dpi 72 -resize 983 083 -i -o .\MASCHINE\%%_nochganz.jpg .\URSPRUNG\???.psd

.\PROGRAMME\nconvert.exe -quiet -out jpeg -dpi 72 -ratio -crop 0 0 153 083 -i -o .\MASCHINE\READY\logo_p1.jpg .\MASCHINE\*_nochganz.jpg
.\PROGRAMME\nconvert.exe -quiet -out jpeg -dpi 72 -ratio -crop 153 0 595 083 -i -o .\MASCHINE\READY\logo_p2.jpg .\MASCHINE\*_nochganz.jpg
.\PROGRAMME\nconvert.exe -quiet -out jpeg -dpi 72 -ratio -crop 748 0 235 083 -i -o .\MASCHINE\READY\logo_p3.jpg .\MASCHINE\*_nochganz.jpg
del .\MASCHINE\*.jpg
you do it with the help of an "INTER-FILE"
taiSon

^

Post by taiSon »

Of course, you must know the persentage between width and height!
Post Reply