Command line utility :: Format of file with actions
There is a text format of actions file (*.act) you can use to process your image files. The actions file is just a text file that can be created by any text editor (like notepad). Each string line of the file must be one of the following commands:
Canvas_size(i1;i2;i3;i4;i5;i6) Change canvas size of an image
i1 - New height of an image (integer)
i2 - New width of an image (integer)
For i3 = 1 an image will be aligned to the left-top
i3 = 2 an image will be aligned at the center-top
i3 = 3 an image will be aligned at the right-top
i3 = 4 an image will be aligned at the center-left
i3 = 5 an image will be aligned at the center
i3 = 6 an image will be aligned at the center-right
i3 = 7 an image will be aligned at the left-bottom
i3 = 8 an image will be aligned at the center-bottom
i3 = 9 an image will be aligned at the right-bottom
i4 - Red component of canvas color (integer from 0 to 255)
i5 - Green component of canvas color (integer from 0 to 255)
i6 - Blue component of canvas color (integer from 0 to 255)
Rotate(i1;i2;i3;i4;p1) Rotates an image
i1 - Angle (integer from 0 to 360)
i2 - Red component of background color (integer form 0 to 255)
i3 - Green component of background color (integer form 0 to 255)
i4 - Blue component of background color (integer form 0 to 255)
For p1 = -1 the an image will be rotated Clockwise
p1 = 1 the an image will be rotated Counter clockwise>
Mirror(p1) Mirrors an image
For p1 = 1 the an image will be mirrored Vertically
p1 = 2 the an image will be mirrored Horizontally
Crop(i1;i2;i3;i4) Crops an image from adges
i1 - Pixels from an image Top (integer)
i2 - Pixels from an image Bottom (integer)
i3 - Pixels from an image Left (integer)
i4 - Pixels from an image Right (integer)
Crop(i1;i2) Crops an image from center
i1 - Height (integer)
i2 - Width (integer)
Resize(i1;i2;p1;p2;p3) Resizes an image
i1 - New Height of an image (integer)
i2 - New Width of an image (integer)
For p1 = 1 image will be resized by pixels
p1 = 2 image will be resized by percentage
For p2 = 1 both Height and Width will be used to resize an image (without keepping aspect)
p2 = 2 Height will be used to calculate new Width (keepping aspect)
p2 = 2 Width will be used to calculate new Height (keepping aspect)
p2 = 4 both Height and Width will be used to resize an image (with keepping aspect)
For p3 = 1 image will NOT be resized if new Height and Width are less than original
p3 = 2 image will be resized if new Height and Width are less than original
Change_to_2(p1) Changes color resolution to 2 colors Parameter p1 is not used (reserved)
Change_to_4(p1) Changes color resolution to 4 colors
Parameter p1 is not used (reserved)
Change_to_8(p1) Changes color resolution to 8 colors
Parameter p1 is not used (reserved)
Change_to_16(p1) Changes color resolution to 16 colors
Parameter p1 is not used (reserved)
Change_to_32(p1) Changes color resolution to 32 colors
Parameter p1 is not used (reserved)
Change_to_64(p1) Changes color resolution to 64 colors
Parameter p1 is not used (reserved)
Change_to_128(p1) Changes color resolution to 128 colors
Parameter p1 is not used (reserved)
Change_to_256(p1) Changes color resolution to 256 colors
Parameter p1 is not used (reserved)
Change_to_true Changes color resolution to True colors (24 bit)
Change_to_gray(p1) Changes color resolution to Gray (8 bit)
Parameter p1 is not used (reserved)
Change_to_high Changes color resolution to High colors (16 bit)
Change_to_gray24 Changes color resolution to Gray (24 bit)
Change_to_negative Makes negative color transformation
RGB(i1;i2;i3) changes Red, Breen and Blue balance
i1 - Red (integer from -100 to 100%)
i2 - Green (integer from -100 to 100%)
i3 - Blue (integer from -100 to 100%)
HLS(i1;i2;i3) changes Hue, Luminance and Saturation balance
i1 - Hue (integer from -100 to 100%)
i2 - Luminance (integer from -100 to 100%)
i3 - Saturation (integer from -100 to 100%)
HSV(i1;i2;i3) changes Hue, Saturation and Volume balance
i1 - Hue (integer from -100 to 100%)
i2 - Saturation (integer from -100 to 100%)
i3 - Volume (integer from -100 to 100%)
BC(i1;i2) changes Brightness and contrast balance
i1 - brightness (integer from -100 to 100%)
i2 - contrast (integer from -100 to 100%)
Blur(r1;i1) applies Blur filter
r1 - Readius (real from 0.5 to 2.5)
Sharpen(i1) applies Sharpen filter
i1 - Intensity (integer from 0 to 100%)
Add_border(i1;i2;i3;i4;p1) Adds color border to an image
i1 - Border width (integer in pixels)
i2 - Red component of border color (integer from 0 to 255)
i3 - Green component of border color (integer from 0 to 255)
i4 - Blue component of border color (integer from 0 to 255)
For p1 = 1 Border will be placed inside an image
p1 = 2 Border will be placed outside an image
Add_shadow(i1;i2;i3;i4;i5;i6;i7;i8) Adds color shadow to an image
i1 - Blur width (integer in pixels)
i2 - Distance to the shadow (integer in pixels)
i3 - Red component of shadow color (integer from 0 to 255)
i4 - Green component of shadow color (integer from 0 to 255)
i5 - Blue component of shadow color (integer from 0 to 255)
i6 - Red component of background color (integer from 0 to 255)
i7 - Green component of background color (integer from 0 to 255)
i8 - Blue component of background color (integer from 0 to 255)
Color_replace(i1;i2;i3;i4;i5;i6;i7) replaces colors of pixels
i1 - Red component of original color (integer from 0 to 255)
i2 - Green component of original color (integer from 0 to 255)
i3 - Blue component of original color (integer from 0 to 255)
i4 - Red component of replacement color (integer from 0 to 255)
i5 - Green component of replacement color (integer from 0 to 255)
i6 - Blue component of replacement color (integer from 0 to 255)
i7 - Tolerance value for the colors coincidence (integer from 0 to 100)
Watermark(s1;i1;i2;i3) Adds watermark without transperency effect
s1 - Full path to watermark image file (string without quotation marks)
i1 - Percent horizontal position of left upper watermark image's corner (integer from 1 to 100%)
i2 - Percent vertical position of left upper watermark image's corner (integer from 1 to 100%)
i3 - Opacity percent of watermark image (integer from 1 to 100%)
Watermark(s1;i1;i2;i3;i4;i5;i6;i7) Adds watermark with transperency effect. If a watermark image has an alpha channel then the i4, i5, i6 and i7 parameters does not affect the action result.
s1 - Full path to watermark image file (string without quotation marks)
i1 - Percent horizontal position of left upper watermark image's corner (integer from 1 to 100%)
i2 - Percent vertical position of left upper watermark image's corner (integer from 1 to 100%)
i3 - Opacity percent of watermark image (integer from 1 to 100%)
i4 - Red component of transparency color (integer form 0 to 255)
i5 - Green component of transparency color (integer form 0 to 255)
i6 - Blue component of transparency color (integer form 0 to 255)
i7 - Tolerance value for transparency color coincidence (integer from 0 to 100)
Text_watermark(s1;i1;i2;i3;s2;i4;i5;i6;i7;i8;i9;i10;i11;i12) Adds text watermark
s1 - Text string (without quotation marks)
i1 - Percent horizontal position of left upper watermark text's corner (integer from 1 to 100%)
i2 - Percent vertical position of left upper watermark text's corner (integer from 1 to 100%)
i3 - Opacity percent of watermark text (integer from 1 to 100%)
s2 - Name of font used to place text watermark (string without quotation marks)
i4 - Font size (integer from 1 to 100)
i5 - Red component of font color (integer form 0 to 255)
i6 - Green component of font color (integer form 0 to 255)
i7 - Blue component of font color (integer form 0 to 255)
i8 = 1 font will include the bold option, and = 2 otherwise
i9 = 1 font will include the italic option, and = 2 otherwise
i10 = 1 font will include the underline option, and = 2 otherwise
i11 = 1 font will include the strike option, and = 2 otherwise
i12 = 2 name of converted file will be used instead of s1 string, = 1 otherwise
This is an example of a text file with actions:
Canvas_size(101;100;5;255;255;255)
Rotate(0;255;255;255;1)
Mirror(2)
Crop(10;10;10;10)
Crop(100;100)
Resize(100;100;1;1;2)
Resize(100;100;2;1;2)
Resize(100;100;1;2;1)
Change_to_256(1)
RGB(0;0;50)
HLS(0;10;0)
HSV(10;0;0)
BC(10;0)
Blur(2.50)
Sharpen(20)
Add_border(10;160;160;164;1)
Add_shadow(20;10;160;160;164;255;255;255)
Color_replace(255;255;255;255;255;255;10)
Watermark(C:\NOT_REG.BMP;50;50;100;255;255;255;5)
Text_watermark(copyright;50;50;100;MS Sans Serif;8;8;0;0;2;2;2;2;2)
See also: