organize, sort, combine everyway, scripting Batch coversion
hello,
The majority of simple operations could hand out much improvement by adding some sort of possibility to combine, or rather to add various possibilities of combination methods. But not all possible means to manipulate an image are ready to hand, off course. I especially treat the crop and resize options, but similar conversion systems could be made for color changes,...
an idea could be that the form would be arranged differently in columns:
operation (crophorizontallytop, crophorizontallybottom, cropverticallyleft, cropverticallyleft, resize) // user value // value type (%, px, cm, inch) // condition (... make it possible to add expressions...)
this would force the user to make only one operation a time, so storing settings is not so usefull anymore. This does not really mend matters...
A better idea is to design a scripting language. In one fell swoop you open a tremendous range of opportunitys to the user. The trick is to make it easy to understand to the layman of scripting...
This example (theoretical) script would turn the original long side of the picture up (vertically) and crop the picture into a square. When the picture has a long side that is a fourth (or more than a fourth part) more than the size of the short side, it will crop unequally at the top (0,3*var) and at the bottom (0,2*var) (always the long direction because of the previous turn). When the long side is less than a fourth of the short one, the cropping works out taking away the same amount at the top (var/2) and the bottom (var/2).
if the long side is a fourth (or more than a fourth part) more than the size of the short side,
when the long side is horizontal, horizontalvariable will have the value 1
if 1, flip the image/ if 0, nothing happens
the difference of the long side and the short side is stored in "var"
this will command to crop the image: cropY (amount to crop at the top; amount to crop at the bottom)
end should empty the variables, rerun the script on the next image or leave when done.
else if the long side is NOT a fourth (or more than a fourth part) more than the size of the short side,
the difference of the long side and the short side is stored in "var"
when the image is already a square, the scripting language default could choose the vertical side as the long side, but it would end here
if horizontalvariable is 1, flip the image/ if 0, nothing happens
crop the image in equal proportions at the top (var/2) and the bottom (var/2)
ends.
Code:
if longside >= 1,25*shortside { gethorizontalstate (longside; "horizontalvariable") if horizontalvariable=1 { flip (clockwise; 90°) } longside-shortside="var" cropY (0,3*var; 0,2*var) end } else { longside-shortside="var" if var=0 {end} else { gethorizontalstate (longside; "horizontalvariable") if horizontalvariable=1 { flip (clockwise; 90°) } cropY (var/2; var/2) } end }
if the long side is a fourth (or more than a fourth part) more than the size of the short side,
when the long side is horizontal, horizontalvariable will have the value 1
if 1, flip the image/ if 0, nothing happens
the difference of the long side and the short side is stored in "var"
this will command to crop the image: cropY (amount to crop at the top; amount to crop at the bottom)
end should empty the variables, rerun the script on the next image or leave when done.
else if the long side is NOT a fourth (or more than a fourth part) more than the size of the short side,
the difference of the long side and the short side is stored in "var"
when the image is already a square, the scripting language default could choose the vertical side as the long side, but it would end here
if horizontalvariable is 1, flip the image/ if 0, nothing happens
crop the image in equal proportions at the top (var/2) and the bottom (var/2)
ends.
other automated seletion modification examples
to make thubs:turn longest side vertical, resize (with or without limitations), display a retangle round the mouse and let the user see the image and choose the position by clicking.
detect the global brightness of each image, compared with the quantity of pixels that are in heavy contrast, make the image's brightnesses and contrasts similar.
set a maximum file size, and compression factor & file type limitations and other settings?
so, this were ideas that would probebly take enormous efforts to put into practice, but I think it would gain an extra star, up to the fifth version! ok it is not my place to say that. Suggestions, additions, about organizing the future Batch conversion techniques, or just comments are welcome!
with kindest regards, Bart
(pff I dont wreally speak English fluently)
Comment