Convert Image Format



Image - Convert

Declaration

<AMIMAGE ACTIVITY='convert' SOURCEIMAGE='text' TYPE='text (options)' DATASET='text' DESTINATIONIMAGE='text' SUBFOLDERS='YES/NO' KEEPFOLDERSTRUCT='YES/NO' OVERWRITE='YES/NO' ISNEWER='YES/NO' ONLYIFEXIST='YES/NO' OVERWRITEREADONLY='YES/NO' OVERWRITEHIDDEN='YES/NO' ARCHIVETURNOFF='YES/NO' EXCLUDE='text' RE='YES/NO' ISNEWERTHAN='date' ISOLDERTHAN='date' ATTRFILTER='text' />

Description:

Converts an image to the desired file format. Supported image formats are JPEG, PNG, BMP, TIFF and GIF.

IrfanView is a free SVG to TGA converter software for Windows. This software is mainly used to view and enhance images of various formats. Some of the image formats that it supports are JPG, JP2, SVG, JLS, TIFF, BMP, GIF, and more.It also provides a dedicated Batch Conversion section to convert multiple images of different formats at a time. Before starting the conversion, users can also use. Just select your format you want to convert to, upload your image file and optionally select filters. Your image will be converted instantly and you can download the result after only a couple of seconds. Convert an image to the BMP format Convert your images to the BMP format with this free online image converter.

Practical Usage

Can be used to convert an image to another format in order to reduce its size. It can also be used together with Loop activities in order to convert a batch of images to a desired format.

Parameters

General

Property

Type

Required

Default

Markup

Description

Source

Text

Yes

(Empty)

SOURCEIMAGE='c:tempsource.jpg'

The path and file name of the source image to convert. Supported image formats are JPEG, PNG, BMP, TIFF and GIF.

Destination

Text

Yes

(Empty)

DESTINATIONIMAGE='c:tempdest.jpg'

The path and file name of the destination image. This allows you to save your file under a new path, name and/or type to avoid overwriting the source (original) file. To overwrite the source file, enter its original path and file name.

NOTE: If performing an overwrite, make sure to set the Overwrite if exists parameter to YES (enabled) in the File Options properties. This will allow matching files found in the destination folder to be overwritten.

Convert to

The image file type to convert to. This is a visual mode parameter used only during design time to change the file type that appears in the Destination parameter, therefore, it contains no properties or markup. The available options are:

  • Png - Convert to PNG.

  • Jpeg - Convert to Jpeg

  • Property

    The name of a dataset to create and populate with information about this activity's results. For more details, see Datasets below.

    File Options

    Property

    Type

    Required

    Default

    Markup

    Description

    Include sub-folders

    Yes/No

    No

    No

    SUBFOLDERS='YES'

    If set to YES, denotes that, if present, sub-folders should be searched for files matching the mask specified in the Source parameter. If set to NO (default), sub-folders are ignored. Only files that exist in the root of the source folder will be searched.

    Preserve folder structure

    Yes/No

    No

    Yes

    KEEPFOLDERSTRUCT='NO'

    If set to YES (default), sub-folders found in the source folder will be created in the destination folder and source files will be copied into their respective folders. If set to NO, sub-folders will not be created. Files that exist in these sub-folders will be copied into the root of the source folder instead. This parameter is active only if the Include sub-folders parameter is set to YES.

    Include empty sub-folders

    Yes/No

    No

    No

    EMPTYFOLDERS='YES'

    If set to YES, sub-folders found in the source folder will be created in the destination folder even if they do not contain any files. If set to NO (default), empty sub-folders are ignored. This parameter is active only if the Include Sub-folders parameter is set to YES.

    Only folder structure

    Yes/No

    No

    No

    ONLYFOLDERSTRUCT='YES'

    If set to YES, sub-folders found in the source folder will be created in the destination folder but files that reside in these sub-folders will not be copied. This parameter is set to NO by default and is active only if the Include Sub-folders parameter is set to YES.

    NOTE: Setting this parameter to YES causes all other folder-specific parameters to be ignored.

    Overwrite if Exist

    Yes/No

    No

    No

    OVERWRITE='YES'

    If set to YES, matching files found in the destination folder are to be overwritten. If set to NO (default), an error will occur as a result of a matching file found.

    Only if Newer

    Yes/No

    No

    No

    ISNEWER='YES'

    If set to YES, only source files that are newer than those that match in the destination are to be overwritten folder will overwrite existing files. If set to NO (default), all matching files found in the destination folder will be overwritten regardless of their date properties. This parameter is active only if the Overwrite if Exists parameter is set to YES.

    Only if exist in destination

    Yes/No

    No

    No

    ONLYIFEXIST='YES'

    If set to YES, only files that already exist in the destination folder will be copied from the source folder. All other files, regardless of whether they match the mask or other parameter settings will be bypassed. This parameter is set to NO by default and becomes active only if the Overwrite if Exist parameter is set to YES.

    Overwrite read-only files

    Yes/No

    No

    No

    OVERWRITEREADONLY='YES'

    If set to YES, matching files found in the destination folder will be overwritten even if they are marked with the read-only attribute. If set to NO (default), read-only files are not overwritten. This parameter is active only if the Overwrite if Exist parameter is set to YES.

    Overwrite hidden files

    Yes/No

    No

    No

    OVERWRITEHIDDEN='YES'

    If set to YES, matching files found in the destination folder will be overwritten even if they are marked with the hidden attribute. If set to NO (default), hidden files are not overwritten. This parameter is active only if the Overwrite if Exist parameter is set to YES.

    Turn archive attribute off

    Yes/No

    No

    No

    ARCHIVETURNOFF='YES'

    If set to YES, archive attribute of the source files will be switched OFF. The Windows archive attribute is generally used to track whether a file has been backed-up. Turning the source file's archive attribute off indicates to many backup programs that the file has already been backed-up. This parameter is set to NO by default.

    Exclude mask

    Text

    No

    (Empty)

    EXCLUDE='*.txt'

    Causes this action to omit files matching the mask(s) specified. File names or wildcard masks may be used. Multiple entries may be specified by separating them with a pipe symbol (|), for example: *.txt|*.bak

    Only if newer than

    Date

    No

    (Empty)

    ISNEWERTHAN=

    '%DateSerial(2001,10,12) + TimeSerial(00,00,00)%'

    If enabled, causes this action to only act on files that are newer than the date/time specified. If this parameter is left blank or disabled (default), file dates are ignored.

    Click the Custom button to select from a list of pre-defined date parameters. Enable the Expression option to allow entry of a date/time expression.

    Only if older than

    Date

    No

    (Empty)

    ISOLDERTHAN=

    '%DateSerial(2001,10,12) + TimeSerial(00,00,00)%'

    If enabled, causes this action to only act on files that are older than the date/time specified. If this parameter is left blank or disabled (default), file dates are ignored.

    Click the Custom button to select from a list of pre-defined date parameters. Enable the Expression option to allow entry of a date/time expression.

    File Filter

    Property

    Type

    Required

    Default

    Markup

    Description

    Attributes

    Text (Options)

    No

    (Empty)

    1. ATTRFILTER='+R+A-H' (read-only & archive files will be affected but not hidden files)

    2. ATTRFILTER='-S+H+E' (hidden and encrypted files will be affected but not system files)

    Instructs the activity to filter which files it should act on based on whether the file's original attribute settings match the attribute settings specified in this parameter. For example, if the Read-only attribute is set to Off (in visual mode) or '-R' (in AML mode) , only source files with the Read-only attribute turned off will be affected. Source files with Read-only turned on will be ignored.

    In visual mode, a group of controls are provided to assist in the selection of attribute settings. In AML mode, a single text item must be entered that contains the original attribute mask of the files you wish to affect. Available Options are:

    • R—Read-only - Specifying On or '+R' causes files with this attribute turned on to be included. Specifying Off or '-R' causes files with this attribute turned off to be included. Specifying Doesn't matter or excluding the letter (default) causes this attribute to be ignored.

    • A—Archive - Specifying On or '+A' causes files with this attribute turned on to be included. Specifying Off or '-A' causes files with this attribute turned off to be included. Specifying Doesn't matter or excluding the letter (default) causes this attribute to be ignored.

    • S—System - Specifying On or '+S' causes files with this attribute turned on to be included. Specifying Off or '-S' causes files with this attribute turned off to be included. Specifying Doesn't matter or excluding the letter (default) causes this attribute to be ignored.

    • H—Hidden - Specifying On or '+H' causes files with this attribute turned on to be included. Specifying Off or '-H' causes files with this attribute turned off to be included. Specifying Doesn't matter or excluding the letter (default) causes this attribute to be ignored.

    • C—Compression - Specifying On or '+C' causes files with this attribute turned on to be included. Specifying Off or '-C' causes files with this attribute turned off to be included. Specifying Doesn't matter or excluding the letter (default) causes this attribute to be ignored.

    • E-Encrypted - Specifying On or '+E' causes files with this attribute turned on to be included. Specifying Off or '-E' causes files with this attribute turned off to be included. Specifying Doesn't matter or excluding the letter (default) causes this attribute to be ignored.

    Datasets

    A dataset is a multi-column, multi-row object that contains a collection of data gathered during execution of an activity and stored in memory. This activity creates and populates a dataset with the following rows:

    Name

    Type

    Return Value

    theDataset.Destination

    Text

    The path and filename of the output file.

    theDataset.Message

    Number

    If theDataset.Result returns 1, this field returns a description of the error that occurred. If theDataset.Result returns 0, this field is left blank.

    theDataset.Result

    Number

    The runtime result of this activity. If 0 is returned, this activity ran successfully. If1 is returned, this activity failed with an error.

    theDataset.Source

    Text

    The path and file name of the source (original) file.

    Example

    Convert Image To High Resolution

    NOTE: The sample AML code below can be copied and pasted directly into the Steps panel of the Task Builder.

    Description: Convert image 'c:tempimage1.bmp' to 'c:tempimage2.jpeg'.

    <AMIMAGE ACTIVITY='convert' SOURCEIMAGE='c:tempimage1.bmp' TYPE='jpeg' DATASET='conversionData' DESTINATIONIMAGE='c:tempimage2.jpeg' SUBFOLDERS='yes' KEEPFOLDERSTRUCT='yes' OVERWRITE='yes' />

    Convert Image Format In Python

    -adaptive-blur geometryadaptively blur pixels; decrease effect near edges
    -adaptive-resize geometryadaptively resize image with data dependent triangulation.
    -adaptive-sharpen geometryadaptively sharpen pixels; increase effect near edges
    -adjoinjoin images into a single multi-image file
    -affine matrixaffine transform matrix
    -alphaon, activate, off, deactivate, set, opaque, copy',transparent, extract, background, or shape the alpha channel
    -annotate geometry textannotate the image with text
    -antialiasremove pixel-aliasing
    -appendappend an image sequence
    -authenticate valuedecipher image with this password
    -auto-gammaautomagically adjust gamma level of image
    -auto-levelautomagically adjust color levels of image
    -auto-orientautomagically orient image
    -auto-threshold methodautomatically perform image thresholding
    -background colorbackground color
    -bench iterationsmeasure performance
    -bias valueadd bias when convolving an image
    -bilateral-blur geometrynon-linear, edge-preserving, and noise-reducing smoothing filter
    -black-threshold valueforce all pixels below the threshold into black
    -blue-primary pointchromaticity blue primary point
    -blue-shift factorsimulate a scene at nighttime in the moonlight
    -blur geometryreduce image noise and reduce detail levels
    -border geometrysurround image with a border of color
    -bordercolor colorborder color
    -brightness-contrast geometryimprove brightness / contrast of the image
    -canny geometryuse a multi-stage algorithm to detect a wide range of edges in the image
    -caption stringassign a caption to an image
    -cdl filenamecolor correct with a color decision list
    -channel typeapply option to select image channels
    -charcoal radiussimulate a charcoal drawing
    -chop geometryremove pixels from the image interior
    -clahe geometrycontrast limited adaptive histogram equalization
    -clampset each pixel whose value is below zero to zero and any the pixel whose value is above the quantum range to the quantum range (e.g. 65535) otherwise the pixel value remains unchanged.
    -clipclip along the first path from the 8BIM profile
    -clip-maskfilenameassociate clip mask with the image
    -clip-path idclip along a named path from the 8BIM profile
    -clone indexclone an image
    -clutapply a color lookup table to the image
    -connected-components connectivityconnected-components uniquely labeled, choose from 4 or 8 way connectivity
    -contrast-stretch geometryimprove the contrast in an image by `stretching' the range of intensity value
    -coalescemerge a sequence of images
    -colorize valuecolorize the image with the fill color
    -color-matrix matrixapply color correction to the image.
    -colors valuepreferred number of colors in the image
    -colorspace typeset image colorspace
    -color-threshold start-color-stop-colorforce all pixels in the color range to white otherwise black
    -combinecombine a sequence of images
    -comment stringannotate image with comment
    -comparecompare image
    -complexoperatorperform complex mathematics on an image sequence
    -compose operatorset image composite operator
    -compositecomposite image
    -compress typeimage compression type
    -contrastenhance or reduce the image contrast
    -convolve coefficientsapply a convolution kernel to the image
    -copy geometryoffsetcopy pixels from one area of an image to another
    -crop geometrycrop the image
    -cycle amountcycle the image colormap
    -decipher filenameconvert cipher pixels to plain
    -debug eventsdisplay copious debugging information
    -define format:optiondefine one or more image format options
    -deconstructbreak down an image sequence into constituent parts
    -delay centisecondsdisplay the next image after pausing
    -delete indexdelete the image from the image sequence
    -density geometryhorizontal and vertical density of the image
    -depth valueimage depth
    -despecklereduce the speckles within an image
    -direction typerender text right-to-left or left-to-right
    -display serverget image or font from this X server
    -dispose methodlayer disposal method
    -distribute-cache portlaunch a distributed pixel cache server
    -distort type coefficientsdistort image
    -dither methodapply error diffusion to image
    -draw stringannotate the image with a graphic primitive
    -duplicate count,indexesduplicate an image one or more times
    -edge radiusapply a filter to detect edges in the image
    -emboss radiusemboss an image
    -encipher filenameconvert plain pixels to cipher pixels
    -encoding typetext encoding type
    -endian typeendianness (MSB or LSB) of the image
    -enhanceapply a digital filter to enhance a noisy image
    -equalizeperform histogram equalization to an image
    -evaluate operator valueevaluate an arithmetic, relational, or logical expression
    -evaluate-sequence operatorevaluate an arithmetic, relational, or logical expression for an image sequence
    -extent geometryset the image size
    -extract geometryextract area from image
    -family namerender text with this font family
    -features distanceanalyze image features (e.g. contract, correlations, etc.).
    -fftimplements the discrete Fourier transform (DFT)
    -fill colorcolor to use when filling a graphic primitive
    -filter typeuse this filter when resizing an image
    -flattenflatten a sequence of images
    -flipflip image in the vertical direction
    -floodfill geometry colorfloodfill the image with color
    -flopflop image in the horizontal direction
    -font namerender text with this font
    -format stringoutput formatted image characteristics
    -frame geometrysurround image with an ornamental border
    -function nameapply a function to the image
    -fuzz distancecolors within this distance are considered equal
    -fx expressionapply mathematical expression to an image channel(s)
    -gamma valuelevel of gamma correction
    -gaussian-blur geometryreduce image noise and reduce detail levels
    -geometry geometrypreferred size or location of the image
    -gravity typehorizontal and vertical text placement
    -grayscale methodconvert image to grayscale
    -green-primary pointchromaticity green primary point
    -helpprint program options
    -hough-lines geometryidentify lines in the image
    -identifyidentify the format and characteristics of the image
    -iftimplements the inverse discrete Fourier transform (DFT)
    -illuminant typereference illuminant
    -implode amountimplode image pixels about the center
    -insert indexinsert last image into the image sequence
    -intensity methodmethod to generate an intensity value from a pixel
    -intent typetype of rendering intent when managing the image color
    -interlace typetype of image interlacing scheme
    -interline-spacing valuethe space between two text lines
    -interpolate methodpixel color interpolation method
    -interword-spacing valuethe space between two words
    -kerning valuethe space between two characters
    -kmeans geometryK means color reduction
    -kuwahara geometryedge preserving noise reduction filter
    -label stringassign a label to an image
    -lat geometrylocal adaptive thresholding
    -layers methodoptimize or compare image layers
    -level valueadjust the level of image contrast
    -limit type valuepixel cache resource limit
    -linear-stretch geometrylinear with saturation histogram stretch
    -liquid-rescale geometryrescale image with seam-carving
    -list typeColor, Configure, Delegate, Format, Magic, Module, Resource, or Type
    -log formatformat of debugging information
    -loop iterationsadd Netscape loop extension to your GIF animation
    -mattecolor colorframe color
    -median radiusapply a median filter to the image
    -mean-shift geometrydelineate arbitrarily shaped clusters in the image
    -metric typemeasure differences between images with this metric
    -mode radiusmake each pixel the 'predominant color' of the neighborhood
    -modulate valuevary the brightness, saturation, and hue
    -momentsdisplay image moments.
    -monitormonitor progress
    -monochrometransform image to black and white
    -morph valuemorph an image sequence
    -morphology methodkernelapply a morphology method to the image
    -motion-blur geometrysimulate motion blur
    -negatereplace each pixel with its complementary color
    -noise radiusadd or reduce noise in an image
    -normalizetransform image to span the full range of colors
    -opaque colorchange this color to the fill color
    -ordered-dither NxNordered dither the image
    -orient typeimage orientation
    -page geometrysize and location of an image canvas (setting)
    -paint radiussimulate an oil painting
    -perceptibleset each pixel whose value is less than |epsilon| to -epsilon or epsilon (whichever is closer) otherwise the pixel value remains unchanged.
    -pingefficiently determine image attributes
    -pointsize valuefont point size
    -polaroid anglesimulate a Polaroid picture
    -poly termsbuild a polynomial from the image sequence and the corresponding terms (coefficients and degree pairs).
    -posterize levelsreduce the image to a limited number of color levels
    -precision valueset the maximum number of significant digits to be printed
    -preview typeimage preview type
    -print stringinterpret string and print to console
    -process image-filterprocess the image with a custom image filter
    -profile filenameadd, delete, or apply an image profile
    -quality valueJPEG/MIFF/PNG compression level
    -quantize colorspacereduce image colors in this colorspace
    -quietsuppress all warning messages
    -radial-blur angleradial blur the image
    -raise valuelighten/darken image edges to create a 3-D effect
    -random-threshold low, highrandom threshold the image
    -range-threshold low-black, low-white, high-white, high-blackperform either hard or soft thresholding within some range of values in an image
    -read-mask filenameassociate a read mask with the image
    -red-primary pointchromaticity red primary point
    -regard-warningspay attention to warning messages.
    -region geometryapply options to a portion of the image
    -remap filenametransform image colors to match this set of colors
    -renderrender vector graphics
    -repage geometrysize and location of an image canvas
    -resample geometrychange the resolution of an image
    -resize geometryresize the image
    -respect-parenthesessettings remain in effect until parenthesis boundary.
    -roll geometryroll an image vertically or horizontally
    -rotate degreesapply Paeth rotation to the image
    -sample geometryscale image with pixel sampling
    -sampling-factor geometryhorizontal and vertical sampling factor
    -scale geometryscale the image
    -scene valueimage scene number
    -seed valueseed a new sequence of pseudo-random numbers
    -segment valuessegment an image
    -selective-blur geometryselectively blur pixels within a contrast threshold
    -separateseparate an image channel into a grayscale image
    -sepia-tone thresholdsimulate a sepia-toned photo
    -set attribute valueset an image attribute
    -shade degreesshade the image using a distant light source
    -shadow geometrysimulate an image shadow
    -sharpen geometrysharpen the image
    -shave geometryshave pixels from the image edges
    -shear geometryslide one edge of the image along the X or Y axis
    -sigmoidal-contrast geometryincrease the contrast without saturating highlights or shadows
    -smush offsetsmush an image sequence together
    -size geometrywidth and height of image
    -sketch geometrysimulate a pencil sketch
    -solarize thresholdnegate all pixels above the threshold level
    -sort-pixelssorts pixels within each scanline in ascending order of intensity
    -splice geometrysplice the background color into the image
    -spread radiusdisplace image pixels by a random amount
    -statistic typegeometryreplace each pixel with corresponding statistic from the neighborhood
    -stripstrip image of all profiles and comments
    -stroke colorgraphic primitive stroke color
    -strokewidth valuegraphic primitive stroke width
    -stretch typerender text with this font stretch
    -style typerender text with this font style
    -swap indexesswap two images in the image sequence
    -swirl degreesswirl image pixels about the center
    -synchronizesynchronize image to storage device
    -taintmark the image as modified
    -texture filenamename of texture to tile onto the image background
    -threshold valuethreshold the image
    -thumbnail geometrycreate a thumbnail of the image
    -tile filenametile image when filling a graphic primitive
    -tile-offset geometryset the image tile offset
    -tint valuetint the image with the fill color
    -transformaffine transform image
    -transparent colormake this color transparent within the image
    -transparent-color colortransparent color
    -transposeflip image in the vertical direction and rotate 90 degrees
    -transverseflop image in the horizontal direction and rotate 270 degrees
    -treedepth valuecolor tree depth
    -trimtrim image edges
    -type typeimage type
    -undercolor colorannotation bounding box color
    -unique-colorsdiscard all but one of any pixel color.
    -units typethe units of image resolution
    -unsharp geometrysharpen the image
    -verboseprint detailed information about the image
    -versionprint version information
    -viewFlashPix viewing transforms
    -vignette geometrysoften the edges of the image in vignette style
    -virtual-pixel methodaccess method for pixels outside the boundaries of the image
    -wave geometryalter an image along a sine wave
    -wavelet-denoise thresholdremoves noise from the image using a wavelet transform
    -weight typerender text with this font weight
    -white-point pointchromaticity white point
    -white-threshold valueforce all pixels above the threshold into white
    -write filenamewrite images to this file
    -write-mask filenameassociate a write mask with the image