Page 1 of 1
New Processors - Conditions
Posted: Fri Dec 23, 2011 8:49 am
by -oX-
Its possible to add a new processor-category "conditions"
i think on If/then/else batchs
with Count Colour / Filesize and so on
this would make your converter to the only app is more then batch
tnx
Re: New Processors - Conditions
Posted: Fri Dec 23, 2011 1:01 pm
by xnview
Could you post examples of use?
Re: New Processors - Conditions
Posted: Fri Dec 23, 2011 11:57 pm
by -oX-
if image().x > image()y
then image().rotate(90)
or
do while image().save.filesize > 10000
i=-0.1
image().resize(i)
end
or
select image().countcolour
> 10.000 then image().posterize(256)
> 1.000 then image().posterize(64)
> 100 then image().posterize(16)
end
Re: New Processors - Conditions
Posted: Sat Dec 24, 2011 9:52 am
by Peter2
Hello -oX-
your suggestion sounds fine, but I always bear in mind: Where are the limits of these "conditions"?
Image size: in Pixel or Point or Inch or cm? Absolute ("length greater then width"; "length greater then 110% of width"; "length greater then width+20 px")
File size: Reduce to 50% of file size; reduce to 50% of image width; reduce to fixed image width, reduce to fixed file size, ...
This becomes not easy to develop and not easy to use in form of conditions.
A solution without conditions could be:
- Use an intermediate step to search and filter the files you need (e.g. with a file manager or with the filters in XnView)
- then run a defined conversion with a defined batch of file
That sounds unhandy and not-state-of-the-art, but you are absolutely free with your filter-and-search-definitions.
Peter
Re: New Processors - Conditions
Posted: Sun Dec 25, 2011 1:52 am
by -oX-
how i can count the colours?