Описание  /  Автоматизация  / 

Интерфейс командной строки

Простая
Автоматизация

Вы разработчик программного обеспечения или же опытный пользователь компьютера и хотели бы добавить функции Фотоконвертера в ваш собственный проект? Или, возможно, вы часто занимаетесь обработкой изображений и желали бы автоматизировать ряд повторяющихся процессов редактирования и конвертации? Тогда к вашим услугам возможность работы с любыми функциями Фотоконвертера через интерфейс командной строки (cmd).

Интерфейс командной строки разработан специально для профессионального использования, и доступен только в Про версии Фотоконвертера.

Скачать Фотоконвертер Про

 

Как это работает

Для того чтобы начать работу с программой из cmd, вам потребуется запустить утилиту cons_rcp.exe, которая находится в программной папке Фотоконвертера, и передать в ее основной поток требуемые параметры.

Общий принцип работы:

cons_rcp.exe -s source_file -o output_file [cfg_file.cfg] [act_file.act] [/hide]

Например, чтобы конвертировать всего лишь один файл в формате PNG в формат JPG, необходимо передать следующие параметры:

cons_rcp.exe -s "C:\Path_to\input_file.png" -o "C:\Path_to\output_file.jpg"

Пакетная конвертация

Инструмент cons_rcp.exe работает с конфигурационными файлами (.cfg) и файлами настроек редактирования (.act). Эти файлы проще создавать из графического интерфейса Фотоконвертера, но можно так же воспользоваться любым текстовым редактором.

Конфигурационный файл с расширением .cfg содержит информацию касательно формата, в который вы хотите конвертировать изображения, имен получаемых файлов, места сохранения, а также других важных параметров. Этот файл можно создать с помощью Фотоконвертера, для чего вам нужно выбрать все нужные настройки в программе и воспользоваться функцией Меню → Сохранить конфигурацию как...

В файлах настроек редактирования .act содержится информация о способах редактировании, применяемых к изображениям. Это могут быть функции: Изменить размер, Обрезать, Повернуть, Яркость/Контраст, Водяной знак и многие другие. Файл редактирования создается также просто, как и конфигурационный. Для этого вам надо пройти в раздел Редактировать, где вы сможете добавить все необходимые функции и после этого сохранить их в .act файл через Действие → Сохранить настройки редактирования в файл...

Для пакетной конвертации файлы можно передать в командную строку как через конфигурационный файл .cfg, так и через параметр «-f».

Пример пакетной конвертации:

cons_rcp.exe "C:\Path_to\cfg_file.cfg" "C:\Path_to\act_file.act" -f source_file1 source_file2 source_file3

Любой параметр из конфигурационного файла .cfg можно передать в командную строку напрямую:

cons_rcp.exe -s source_file -o output_file [-cfg_param1 value1] [-cfg_param2 value2]

Например создадим миниатюры:

cons_rcp.exe -s "C:\Path_to\input_file.png" -o "C:\Path_to\output_file.gif" -gif_transparent 1 -create_thumbnails 1

Пакетная конвертация всех BMP из папки в формат JPG:

cons_rcp.exe -source_folder "C:\Path_to\input_folder\" -source_ext bmp -dest_path "C:\Path_to\output_folder\" -dest_ext jpg -jpg_quality 100

Полный список конфигурационных параметров:

-source_folder  = string with path to image files you want to be converted (example: -source_folder "d:\source\")
-source_ext  = string with extension (type) of image files you want to be converted
-file_mask  = string with filename mask of image files you want to be converted (example: -file_mask 1?.*)
-dest_path  = string with path to the destination folder
-same_as_source  = 1 if you want to save each converted image file to the its source folder and = 0 if you want to save it to a folder specified in "Dest_path"
-dest_ext  = string with extension (type) of converted image files
-use_file_list  = string with path to a text file with list of files you want to be converted
-show_transp  = 1 if you want to show/read transparency as a specified color, = 0 otherwise
-transp_red  = red component of specified color (from 0 to 255)
-transp_green  = green component of specified color (from 0 to 255)
-transp_blue  = blue component of specified color (from 0 to 255)
-read_subfolders  =  1 if you want to process files from subfolders of folder defined by "source_folder" parameter and = 0 therwise
-multipage_loading_option  = 0 if you want to convert every page of multipage files, 1 if you want to convert pages specified in the "Multipage_Loading_pages" option
-multipage_actions_option  = 0 if you want to edit every page of multipage files, 1 if you want to edit pages specified in the "Multipage_Apply_actions_pages" option
-multipage_loading_pages  = list of page numbers you want to convert (example: 1, 3, 5-12)
-multipage_apply_actions_pages  = list of page numbers you want to edit (example: 1, 3, 5-12)
-gif_transparent  = 1 if you want to create transparent GIF files and = 0 otherwise
-gif_auto_transp  = 1 if you want the program to take transparency color in auto mode and = 0 otherwise
-gif_color_red  = red component of transparency color (from 0 to 255)
-gif_color_green  = green component of transparency color (from 0 to 255)
-gif_color_blue  = blue component of transparency color (from 0 to 255)
-gif_interlaced  = 1 if you want to create interlaced GIF files and = 0 otherwise
-gif_delay_time  = animation delay time (1/100s)
-jxr_quality  = quality for converted JXR files (from 1 to 100%)
-jpg_quality  = quality for converted JPG files (from 1 to 100%)
-jpg_progressive  = 1 if you want to create progressive JPG files and = 0 otherwise
-jpg_color_space  = color model used to create JPG files (0 - YCbCr; 1 - CMYK; 2 - RGB; 3 - YCbCrK; 4 - Gray)
-tif_compression  = compression method used to create TIF files (0 - no compression; 1 - Huffman; 2 - PackBits (RLE); 3 - CCITT Group 3, 1D; 4 - CCITT Group 3, 2D; 5 - CCITT Group 4, 2D; 6 - JPEG; 7 - LZW)
-tif_save_in_cmyk  = 1 if you want to create CMYK TIF files and = 0 otherwise
-tif_jpg_quality  = quality (from 1 to 100%) for JPEG compression
-png_transparent  = 1 if you want to create transparent PNG files and = 0 otherwise
-png_auto_transp  = 1 if you want the program to take transparency color in auto mode and = 0 otherwise
-png_color_red  = red component of transparency color (from 0 to 255)
-png_color_green  = green component of transparency color (from 0 to 255)
-png_color_blue  = blue component of transparency color (from 0 to 255)
-png_interlaced  = 1 if you want to create interlaced PNG files and = 0 otherwise
-png_compression  = level of compression, the value can vary from 0 (no compression) to 9 (best compression)
-png_animated  = 1 if you want to create animated PNG files and = 0 otherwise
-png_delay_time  = animation delay time (1/100s)
-png_optimized  = 1 if you want to create optimized PNG files and = 0 otherwise
-bmp_compression  = 1 if you want to create compressed BMP files and = 0 otherwise
-pcx_compression  = 1 if you want to create compressed PCX files and = 0 otherwise
-tga_compression  = 1 if you want to create compressed TGA files and = 0 otherwise
-jp2_quality  = quality for converted JP2 files (from 1 to 100%)
-file_name_mask  = string with a radical of converted filename, if you set it to then a radical of converted file will be a filename of a source file
-file_name_mask_prefix  = string with a text prefix that will be added to filename of converted files
-file_name_mask_suffix  = string with a text suffix that will be added to filename of converted files
-file_name_start_number  = initial number that will be used to careate a filename of converted files
-file_name_replace  = 1 if you want to replace a substring in filename and = 0 otherwise
-file_name_substring_1  = string to be replaced in filename
-file_name_substring_2  = string to be replaced with in filename
-file_name_lower_case_ext  = 1 if you want to get converted files with lower case extension and = 0 otherwise
-file_name_case_option  = 0 for no change of converted filenames and = 1 for changing case according to "Case_option"
-file_name_change_case  = 0 for lower case and = 1 for upper case
-multipage_option  = 1 if you want to convert each multipage file to another, = 2 to save all processed files to one multipage file, = 3 to save every page of converted file as a separate file, and = 4 if you want to save group of files to one file
-multipage_group  = number of files in a group (if Option = 4)
-colors_option  = 1 to use output "Bits per sample" and "Sample per pixel" values from original file, = 2 to use optimum values which will be calculated for each converted file, = 3 to define the output color resolution values yourself
-colors_bits_per_sample  = number of bits used to store information about each color channel (from 1 to 8)
-colors_samples_per_pixel  = number of color channels used to store information about one pixel (can be 1 or 3)
-dpi_option  = 1 if you want to copy information about dpi resolution from original file, = 2 if you want to set your own values for dpi resolution
-dpi_x  = horizontal resolution for converted files (from 1 to 10000 dpi)
-dpi_y  = vertical resolution for converted files (from 1 to 10000 dpi)
-copy_alpha  = 1 if you want to copy information about alpha channel (transparency) from original file and = 0 otherwise
-copy_iptc  = 1 if you want to copy IPTC information from original file and = 0 otherwise
-copy_exif  = 1 if you want to copy EXIF information from original file and = 0 otherwise
-use_icc  = 1 if you wabt to use ICC profile of original file and = 0 otherwise
-apply_icc  = 1 if you want to apply and remove ICC profile and = 0 if you want to copy and do not apply ICC profile
-overwrite  = 1 if you want to replace (overwrite) existing file, = 0 if you do not want to overwrite existing file (skip)
-same_date  = 1 if you want to set converted file date same as original file and = 0 otherwise
-save_path  = 0 if you want to save all files into one (destination) folder, 1 if you want to to convert with saving path info according to the "Save_path_option"
-save_path_option  = 1 if you want to to convert with saving path info of an original file starting from a root folder and = 2 if you want to to convert with saving path info starting from a current folder
-delete_files  = 1 if you want to delete successfully processed (source) files and = 0 otherwise. Note, it will not delete a source file if a converted file has the same name and type
-move_files  = 1 if you want to move successfully processed (source) files to a "Move_files_folder" and = 0 otherwise
-move_files_folder  = path to image files you want to be moved
-move_unprocessed_files  = 1 if you want to move unprocessed (source) files to a "Move_unprocessed_files_folder" and = 0 otherwise
-move_unprocessed_files_folder  = path to unprocessed image files you want to be moved
-create_thumbnails  = 1 if you want to create thumbnails and = 0 otherwise
-thumbnails_folder  = path to thumbnail image files you want to be saved
-thumbnails_width  = thumbnail width
-thumbnails_height  = thumbnail height
-thumbnails_resize_type  = 1 - both Height and Width (without keepping aspect), 2 - Height (keepping aspect), 2 - Width (keepping aspect), 4 - both Height and Width will be used (with keepping aspect)
-thumbnails_do_not_resize_if_less  = 1 do not resize images if they are less than thumbnail width/height and = 0 otherwise
-thumbnails_mask  = thumbnail filename mask
-thumbnails_counter  = counter used in the "Thumbnails_Mask" option
-webp_quality  = quality for converted WEBP files (from 1 to 100%, 100% means lossless compression)
-bpg_quality  = quality for converted BPG files (from 1 to 100%, 100% means lossless compression)
-adobe_res  = PDF/AI/PS/EPS/EPI loading resolution (from 1 to 1000dpi)
-adobe_color_res  = color resolution used to read PDF/AI/PS/EPS/EPI files (0 - automatic; 1 - black and white; 8 - Grayscale; 24 - RGB; 32 - CMYK)
-adobe_aa  = 1 if you want to apply anti-aliasing while reading PDF/AI/PS/EPS/EPI files and = 0 otherwise
-adobe_extract_images  = 1 if you want to extract images from PDF files and = 0 otherwise
-adobe_alpha  = 1 if you want to make background transparent and = 0 otherwise
-pdf_compression  = compression method used to create PDF files (0 - no compression; 1 - RLE compression; 2 - CCITT Group 4, 1D; 3 - CCITT Group 3; 4 - JPEG; 5 - LZW; 8 - optimum compression)
-pdf_paper  = PDF paper size (0 - A0; 1 - A1; 2 - A2; 3 - A3; 4 - A4; 5 - A5; 6 - A6; 7 - B5; 8 - Letter; 9 - Legal; 10 - Ledger; 11 - 11"x17"; 12 - size of original image)
-pdf_jpg_quality  = quality (from 1 to 100%) for JPEG compression
-pdf_save_in_cmyk  = 1 if you want to create CMYK PDF files with deflate compression and = 0 otherwise
-eps_save_in_cmyk  = 1 if you want to create CMYK uncompressed EPS or PS files and = 0 otherwise
-pdf_open_password  = string with Open Document password
-pdf_permissions_password  = string with Permissions password
-pdf_allow_printing  = 1 if you want to allow PDF printing and = 0 otherwise
-pdf_allow_editing  = 1 if you want to allow PDF editing and = 0 otherwise
-pdf_allow_copying  = 1 if you want to allow copying from PDF and = 0 otherwise
-create_pdf_a  = 1 if you want to create PDF/A document and = 0 otherwise
-pcl_paper  = PCL paper size (0 - A0; 1 - A1; 2 - A2; 3 - A3; 4 - A4; 5 - A5; 6 - A6; 7 - B5; 8 - Letter; 9 - Legal; 10 - Ledger; 11 - 11"x17")
-pcl_position  = Image position on the page (1 - left-top; 2 - right-top; 3 - center; 4 - left-bottom; 5 - right-bottom)
-pcl_option  = 0 - creates PCL file for color printers; 1 - for monochrome printers (PCL 5/6); 2 - for monochrome printers (PCL 4); 3 - for monochrome printers (PCL 3)
-raw_white_balance  = 1 none, 2 automatic, 3 from camera
-raw_brightness  = from 0 to 500
-raw_interpolation  = interpolation = 0 - Adaptive Homogeneity-Directed, = 1 - Variable Number of Gradients, = 2 - High speed low quality bilinear
-raw_half_size  = 1 if you want to get fast preview (half-size image) and = 0 otherwise
-raw_auto_color  = 1 if you want to apply automatic color correction and = 0 otherwise
-raw_denoise  = 1 if you want to apply denoise filter and = 0 otherwise
-raw_16bit  = 1 if you want to get 16-bit per channel and = 0 otherwise
-vector_zoom  = zoom (from 1 to 1000%) to convert vector to raster images
-swf_extract_images  = 1 if you want to extract images from SWF files and = 0 otherwise
-dxf_dwg_gray  = 1 if you want to convert DXF/DWG/DGN to grayscale and = 0 otherwise
-dxf_dwg_layout  = Output layout (0 - All layouts, 1 - Model space, 2 - All paper spaces)
-ras2vec_option  = Raster to vector algorithm (1 - Centerline, 2 - Outline)
-dxf_dwg_units  = DXF/DWG units when converted from raster formats (1 - mm, 2 - inches, 3 - pixels (scale = 1))
-3d_x  = angle (from 1 to 360 degrees) to rotate 3D image about x-axis
-3d_y  = angle (from 1 to 360 degrees) to rotate 3D image about y-axis
-3d_z  = angle (from 1 to 360 degrees) to rotate 3D image about z-axis
-skip_blank  = 1 if you want skip blank files/pages and = 0 otherwise
-skip_blank_accuracy  = accuracy of blank files/pages detection (from 1 to 100%)
-temp_folder  = string with path to temp folder (example: -temp_folder "d:\temp\")
-dxf_version  = output DXF version (1 - Autocad 12; 2 - Autocad 13; 3 - Autocad 14; 4 - Autocad 2000; 5 - Autocad 2004; 6 - Autocad 2007; 7 - Autocad 2010; 8 - Autocad 2013)
-dwg_version  = output DWG version (1 - Autocad 12; 2 - Autocad 13; 3 - Autocad 14; 4 - Autocad 2000; 5 - Autocad 2004; 6 - Autocad 2007; 7 - Autocad 2010; 8 - Autocad 2013)
-svg_raster  = 1 if you want to create raster SVG files and = 0 otherwise
-svg_quality  = quality for raster SVG files (from 1 to 100%)
-svg_compressed  = 1 if you want to create compressed SVG files and = 0 otherwise
-plt_optimized  = 1 if you want to create optimized PLT files and = 0 otherwise
-plt_rotate  = 0 - Do not rotate, 1 - Rotate 90 degrees right, 2 - Rotate 90 degrees left
-plt_pw  = pen width in plotter units (1 mm = 40 plotter units)
-plt_remove_dup  = 1 if you want to remove duplicated lines and = 0 otherwise
-gbr_raster  = 1 if you want to create GBR using raster to vector conversion and = 0 otherwise
-cpu_usage  = CPU usage level (1 - Low; 2 - Normal; 3 - High)

Графические преобразования

Консольную утилиту cons_rcp.exe можно использовать для применения графических преобразований. Для этого используется файл настроек редактирования .act

Конвертация с редактированием:

cons_rcp.exe -s "C:\Path_to\input_file.jpg" -o "C:\Path_to\output_file.png" "C:\Path_to\act_file.act"

Любой эффект или действие из файла настроек редактирования .act могут быть переданы напрямую в консоль:

cons_rcp.exe -s source_file -o output_file [-action1 param1 param2] [-action2]

Конвертация файла из JPG в PNG и изменение его размеров:

cons_rcp.exe -s "C:\Path_to\input_file.jpg" -o "C:\Path_to\output_file.png" -resize 200x100px qh

Добавить водяной знак:

cons_rcp.exe -s "C:\Path_to\input_file.jpg" -o "C:\Path_to\output_file.jpg" -image_watermark p"C:\Path_to\watermark.jpg" pos30x30% rot90 mt rgb(66,137,212) t10

Полный список доступных преобразований:

-canvas_size (changes canvas size of an image)
  Optional parameters:
  1. New image width and height (Syntax: 200x300px, 2x3in, 10x15cm)
  2. Resolution (Syntax: 300dpi, 450dpc)
     where dpc means dots per cm
  3. Image alignment (Syntax: lt, ct, rt, cl, c, cr, lb, cb, rb)
     where "lt", "ct", "rt", "cl", "c", "cr", "lb", "cb", "rb"
     mean left-top, center-top, right-top, center-left, center,
     center-right, left-bottom, center-bottom, right-bottom.
  4. Canvas color (Syntax: rgb(66,137,212), hex(4289d4))
Example: -canvas_size 200x300 ct

-rotate (rotates an image)
  Optional parameters:
  1. Angle (Syntax: a45, integer from -360 to 360)
  2. Background color (Syntax: rgb(66,137,212), hex(4289d4))
Example: -rotate a45 rgb(255,255,255)

-mirror (mirrors an image)
  Optional parameter:
  1. Direction (Syntax: v, h)
     where "v" means verticall, "h" means horizontall direction
Example: -mirror v

-crop (crops an image from adges)
  Optional parameters:
  1. Pixels from an image Top (Syntax: t10, integer)
  2. Pixels from an image Bottom (Syntax: b10, integer)
  3. Pixels from an image Left (Syntax: l10, integer)
  4. Pixels from an image Right (Syntax: r10, integer)
Example: -crop t10

-crop (crops an image from center)
  Optional parameter:
  1. Width and Height in pixels (Syntax: 100x200)
Example: -crop 100x200

-resize (resizes an image)
  Optional parameters:
  1. New image size (Syntax: 30x0%, 30x30%, 0x100px, 100x200px,
     3x5in, 3x0in, 10x15cm, 10x0cm)
     where 0 means that the value will be calculated with preserved proportions
  2. Resolution (Syntax: 300dpi, 450dpc)
     where dpc means dots per cm
  3. Resampling quality (Syntax: ql, qn, qh)
     where "ql", "qn", "qh" mean low, normal, high.
  4. Do not resize if new size is less than original (Syntax: notless)
  5. Maintain proportions (Syntax: m)
Example: -resize 0x100px qh

-rgb (changes Red, Breen and Blue balance)
  Optional parameters:
  1. Red change (Symtax: r50, integer from -100 to 100)
  2. Green change (Symtax: g50, integer from -100 to 100)
  3. Blue change (Symtax: b50, integer from -100 to 100)
Example: -rgb r-50

-add_border (adds color border to an image)
  Optional parameters:
  1. Border width in pixels (Syntax: w20, integer from 1)
  2. Border color (Syntax: rgb(66,137,212), hex(4289d4))
  3. Border position (Syntax: in, out)
     where "in" and "out" mean inside and outside image.
Example: -add_border w10 rgb(255,0,0) in

-add_shadow (adds color shadow to an image)
  Optional parameters:
  1. Blur width in pixels (Syntax: b10, integer)
  2. Distance to the shadow in pixels (Syntax: d20, integer)
  3. Shadow color (Syntax: s_rgb(66,137,212), s_hex(4289d4))
  4. Background color (Syntax: b_rgb(66,137,212), b_hex(4289d4))
Example: -add_shadow b10 d20 s_rgb(128,128,128) b_rgb(255,255,255)

-color_replace (replaces colors of pixels)
  Optional parameters:
  1. Original color (Syntax: o_rgb(66,137,212), o_hex(4289d4))
  2. Replacement color (Syntax: r_rgb(66,137,212), r_hex(4289d4))
  3. Tolerance for the colors coincidence (Syntax: t10, integer from 0 to 100)
Example: -color_replace o_rgb(255,0,0) r_rgb(0,255,0) t20

-change_to (changes color resolution)
  Optional parameter:
  1. Number of colors (Syntax: 16, integer from 2 to 256)
Example: -change_to 128

-change_to_true (changes color resolution to True colors (24 bit))

-change_to_gray (changes color resolution to Gray (8 bit))

-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)

-hue_sat (changes hue and saturation balance)
  Optional parameters:
  1. Hue change (Syntax: h25, integer from -100 to 100)
  2. Saturation change (Syntax: s25, integer from -100 to 100)
Example: -hue_sat h25 s-25

-bc (changes brightness and contrast balance)
  Optional parameters:
  1. Brightness change (Syntax: b25, integer from -100 to 100)
  2. Contrast change (Syntax: c25, integer from -100 to 100)
Example: -bc b-10 c10

-blur (applies blur filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)
Example: -blur 20

-split_blur (applies split blur filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)
Example: -split_blur 30

-gaussian_blur (applies gaussian blur filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-auto_sharp (applies auto sharp filter)

-sharpen (applies sharpen filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-unsharp_mask (applies unsharp mask filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-antialias (applies antialias filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-gamma (performs gamma correction)
  Optional parameter:
  1. Gamma (Syntax: 0.8, fload from 0.2 to 5.0)
Example: -gamma 1.2

-invert (inverts colors)

-replace_background (replaces background)
  Optional parameters:
  1. Full path to background image file (Syntax: p"c:\image.jpg", string with quotation marks)
  2. Do not stretch image (Syntax: ns)
  3. Background color (Syntax: rgb(66,137,212), hex(4289d4))
  4. Tolerance for colors coincidence (Syntax: t25, integer from 0 to 100)
Example: -replace_background p"c:\background.bmp" rgb(255,255,255) t20

-color_noise (applies color noise filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)
Example: -color_noise 25

-mono_noise (applies mono noise filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-auto_rotate (applies auto rotate)
  Optional parameters:
  1. Background color (Syntax: rgb(66,137,212), hex(4289d4))
  2. Apply antialiasing (Syntax: al, ah, am)
     where "al", "ah", "am" mean antialiasing low quality,
     high quality, maximum quality.
  3. Deskew (Syntax: d)
  4. Rotate landscape to portrait (Syntax: lp)
  5. Rotate portrait to landscape (Syntax: pl)
  6. Rotate using EXIF orientation information (Syntax: exif)
Example: -auto_rotate rgb(255,255,255) ah d

-auto_crop (applies auto crop)
  Optional parameters:
  1. Use color at corner (Syntax: tl, tr, bl, br)
     where "tl", "tr", "bl", "br" mean Top-Left, Top-Right,
     Bottom-Left, Bottom-Right.
  2. Use specified color (Syntax: rgb(66,137,212), hex(4289d4))
  4. Tolerance for colors coincidence (Syntax: t25, integer from 0 to 100)
Example: -auto_crop tl t25

-photo_filter (applies photo filter)
  Optional parameters:
  1. Use specified color (Syntax: rgb(66,137,212), hex(4289d4))
  2. Intensity (Syntax: i20, integer from 0 to 100)
  3. Preserve luminosity (Syntax: pl)
Example: -photo_filter rgb(255,0,0) i25 pl

-stylize (applies stylize filter)
  Optional parameter:
  1. Filter name (Syntax: vintage, lomo, clarity, sincity, sunrise,
     crossprocess, orangepeel, love, grungy,  jarques, pinhole, oldboot, xpro2)
Example: -stylize lomo

-spray (applies spray filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)
Example: -spray 25

-fisheye (applies fisheye filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-mosaic (applies mosaic filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-twist (applies twist filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-tile (applies tile filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-trace (applies trace filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-solorize (applies solorize filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-posterize (applies posterize filter)
  Optional parameter:
  1. Intensity (Syntax: 20, in*teger from 0 to 100)

-ripple_random (applies ripple random filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-ripple_tooth (applies ripple tooth filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-ripple_triangle (applies ripple triangle filter)
  Optional parameter:
  1. Intensity (Syntax: 20, integer from 0 to 100)

-image_watermark (adds image watermark)
  Optional parameters:
  1. Full path to watermark image file (Syntax: p"c:\image.jpg", string with quotation marks)
  2. Watermark position (Syntax: pos30x30%, pos100x200px)
  3. Watermark opacity (Syntax: op100, integer from 1 to 100)
  4. Resize watermark (Syntax: r30, integer from 1)
  5. Rotate watermark (Syntax: rot90, integer from -360 to 360)
  6  Make transparent (Symtax: mt)
  7. Watermark transparency color (Syntax: rgb(66,137,212), hex(4289d4))
  8. Watermark transparency color tolerance (Syntax: t20, integer from 0 to 100)
Example: -image_watermark p"c:\watermark.png" pos10x10% op50 rot90 mt

-text_watermark (adds text watermark)
  Optional parameters:
  1. Text string (Syntax: t"copyright", string with quotation marks)
  2. Watermark position (Syntax: pos30x30%, pos100x200px)
  3. Watermark opacity (Syntax: op100, integer from 1 to 100)
  4. Rotate watermark (Syntax: rot90, integer from -360 to 360)
  5. Font name (Syntax: fn"Arial", string with quotation marks)
  6. Font size (Syntax: fs18, integer from 8)
  7. Font color (Syntax: rgb(66,137,212), hex(4289d4))
  8. Font style (Syntax: b, i, u, s)
     where "b", "i", "u", "s" mean bold, italic, underline, strike.
  9. Place image info (Syntax: filename, copyright, description, datetime, monthday,
     daymonthyear, time, comment, page)
  10. Apply to the page number (Syntax: p1, integer from 1)
Example: -text_watermark t"copyright" pos50x50% op100 fn"Arial" fs24 b

-lens_correction (perform lens correction)
  Optional parameter:
  1. Intensity (Syntax: i20, integer from -100 to 100)
Example: -lens_correction i-30

-black_white (converts to black & white)
  Optional parameters:
  1. Conversion type (Syntax: g, d, f, a, m, t)
     where "g", "d", "f", "a", "m", "t" mean grayscale, dithering, Floyd-Steinberg,
     auto, maximum-entropy, thresholding algorithms.
  2. Threshold level (Syntax: 127, integer from 1 to 255)
Example: -black_white t 200

-jpeg_repair (removes jpeg artifacts)
  Optional parameters:
  1. Intensity (Syntax: i15, integer from 1 to 100)
  2. Sharpen level (Syntax: s10, integer from 1 to 100)
Example: -jpeg_repair i25 s10

-auto_white (performs auto white balance)

-white_balance (performs white balance)
  Optional parameter:
  1. Color to be white (Syntax: rgb(66,137,212), hex(4289d4))
Example: -white_balance rgb(240,240,240)

-point (draws point)
  Optional parameters:
  1. Point position in pixels (Syntax: pos50x50)
  2. Point shape (Syntax: s, c)
     where "s", "c" mean square (default), circle.
  3. Pen color (Syntax: rgb(66,137,212), hex(4289d4))
  4. Pen width (Syntax: p3, integer from 1)
  5. Apply anti-aliasing (Syntax: aa, by default anti-aliasing is off)
Example: -point pos50x50 rgb(66,137,212) p2 aa

-line (draws line)
  Optional parameters:
  1. Starting point in pixels (Syntax: pos50x50)
  2. Size in pixels (Syntax: size100x100)
  3. Pen color (Syntax: rgb(66,137,212), hex(4289d4))
  4. Pen width (Syntax: p3, integer from 1)
  5. Apply anti-aliasing (Syntax: aa, by default anti-aliasing is off)
Example: -line pos50x50 size100x100 rgb(66,137,212) p2 aa

-rectangle (draws rectangle)
  Optional parameters:
  1. Position in pixels (Syntax: pos50x50)
  2. Size in pixels (Syntax: size100x100)
  3. Pen color (Syntax: rgb(66,137,212), hex(4289d4))
  4. Pen width (Syntax: p3, integer from 1)
  5. Apply anti-aliasing (Syntax: aa, by default anti-aliasing is off)
  6. Fill inside area with color (Syntax: fill_rgb(66,137,212), fill_hex(4289d4))
Example: -rectangle pos50x50 size100x100 rgb(66,137,212) p2 aa

-ellipse (draws ellipse)
  Optional parameters:
  1. Position in pixels (Syntax: pos50x50)
  2. Size in pixels (Syntax: size100x100)
  3. Pen color (Syntax: rgb(66,137,212), hex(4289d4))
  4. Pen width (Syntax: p3, integer from 1)
  5. Apply anti-aliasing (Syntax: aa, by default anti-aliasing is off)
  6. Fill inside area with color (Syntax: fill_rgb(66,137,212), fill_hex(4289d4))
Example: -ellipse pos50x50 size100x100 rgb(66,137,212) p2 aa

-remove_bw_noise (removes black & white noise)
  Optional parameters:
  1. Number of pixels in a group (Syntax: 2, integer from 1)
  2. Color of noise pixels (Syntax: b, w)
     where "b", "w" mean black, white.
Example: -remove_bw_noise 2 b

Логи

Лог конвертации можно записать в файл:

cons_rcp.exe "C:\Path_to\cfg_file.cfg" "C:\Path_to\act_file.act" > "C:\Path_to\log_file.txt"

Дополнительный параметры:

  • [/hide] для запуска в бесшумном режиме

Информация о файле

Фотоконвертер может выдавать информацию о файле:

cons_rcp.exe -i source_file

Коды возврата

При обработке команд консольная утилита возвращает следующие коды:

0 - Нет ошибок
1 - Конфигурационный файл (cfg) не найден
2 - Файл настроек редактирования (act) не найден
3 - Недостаточно параметров
4 - cons_rcp.exe Внутренняя ошибка (1)
5 - cons_rcp.exe Внутренняя ошибка (2)
6 - cons_rcp.exe Внутренняя ошибка (3)
7 - Нет файлов для конвертации либо файл-лист не найден
8 - Не все файлы былы успешно обработаны

При работе с команжной строкой надо помнить, что если указываемые пути к файлам (файлам для редактирования, .act, .cfg и другим) являются слишком большими или сложными, содержат пробелы, то их необходимо вводить в двойных кавычках "".

С любыми дополнительными вопросами обращайтесь в службу поддержки пользователей.