Autocrop without knowledge of imagesize

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

Moderators: XnTriq, xnview

Post Reply
TN

Autocrop without knowledge of imagesize

Post by TN » Fri Feb 17, 2006 10:02 am

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: 32499
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Autocrop without knowledge of imagesize

Post by xnview » Fri Feb 17, 2006 10:06 am

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 » Thu Feb 23, 2006 7:33 am

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 » Thu Feb 23, 2006 7:37 am

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

Post Reply