Image
The Image internal command can be used to:
Change the format of images
Resize and rotate images
Upload or synchronize images with an online service
Locate an image using its embedded GPS information
The Image CONVERT
command displays the image conversion dialog in interactive mode, letting you select the conversion options to apply to selected images. Using the various arguments of this command it is possible to automate the image conversion function. The image conversion function can accept as input any image format that Opus is able to view (including those supported by plugins), but can only output in JPEG, PNG, GIF or Bitmap formats.
Command Arguments:
Argument | Type | Possible values | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ADDSUFFIX | /O | (no value) | Add a suffix to the output filename when resizing images. The suffix used indicates the new image size. If the image is not resized, no suffix is added. Example: | ||||||||||
<suffix> | Adds the specified suffix to the output filename. Example: The specified suffix is used provided a new image is written, but there are cases where no image will be written by default, such as when converting images in-place (not to a separate destination directory) and the source image already matches the specified criteria. If you need to ensure that a second copy of the image is created no matter what, using the specified suffix to modify its name, then you should prefix the suffix with the keyword always:. Example: | ||||||||||||
AS | /K | <output filename> | Specify the output filename when converting images. By default the output filename is the same as the input filename, with the possibility of an additional suffix (with the ADDSUFFIX argument) and a different file extension if the image has been converted to a different format. Example: | ||||||||||
BACKGROUND | /O | RRR,GGG,BBB (decimal) #RRGGBB (hexadecimal)</nobr> | When an image with an alpha channel (transparency) is converted to a format that doesn't support the alpha channel, this argument is used to specify the background color that replaces the transparent area. The color can be specified in either decimal or hex format. Example: | ||||||||||
none | Specify BACKGROUND=none in conjunction with a preset to override the saved setting. Example: | ||||||||||||
CONVERT | /O | (no value) | Displays the image conversion dialog in interactive mode when no other arguments are provided. Example: | ||||||||||
jpg | Automates the image conversion function; the converted image will be saved in JPEG format. Example: | ||||||||||||
png | The converted image will be saved in PNG format. Example: | ||||||||||||
gif | The converted image will be saved in GIF format. Example: | ||||||||||||
bmp | The converted image will be saved in BMP format. Example: | ||||||||||||
CROP | /K | <arguments> | Crops selected images. The crop parameters can be specified in several ways:
Example: | ||||||||||
W,H | Crop to specified size (width,height). Centers the crop rectangle in the original image. | ||||||||||||
X,Y,W,H | Crop from specified position (x,y) to specified size (width,height). | ||||||||||||
X,Y-X1,Y1 | Crop from specified position (x,y) to specified position (x1,y1). | ||||||||||||
W:H | Crop to specified ratio (width:height). Centers the crop rectangle in the original image. | ||||||||||||
X,Y,W:H | Crop from specified position (x,y) to specified ratio (width:height). | ||||||||||||
no | Specify CROP=no in conjunction with a preset to override the saved setting and disable cropping. Example: | ||||||||||||
FLIP | /K | h | Flip (mirror) the image horizontally. Example: | ||||||||||
v | Flip the image vertically. Example: | ||||||||||||
no | Specify FLIP=no in conjunction with a preset to override the saved setting. Example: | ||||||||||||
FROM | /M | <filename> ... | Specify the image file or files to operate on. Without this argument the command will operate on all currently selected files. This is the default argument for the Image command and so you do not need to specify the FROM keyword. Remember that if the filename contains a space it needs to be enclosed in quotes. Example: | ||||||||||
HEIGHT | /K/N | <height> | Resize the image to the specified height. Example: | ||||||||||
HERE | /S | (no value) | Write converted images to the source folder. Without this argument converted images are written to the current destination folder. Example: | ||||||||||
LOCATE | /K | <keyword> | Locates the real-world position of the selected image file from its embedded GPS information, using a third-party mapping service. With the exception of Google Earth (which must be installed on your machine), all services open a web browser. The list of location services is configurable via Preferences / Miscellaneous / Advanced: image_locate_services. Several services are defined by default, these are listed below. If the selected image does not have GPS information this command will have no effect. Example: | ||||||||||
bing | Locates the image using Bing maps (will open in a web browser). Example: | ||||||||||||
Locates the image using Google maps (will open in a web browser). Example: | |||||||||||||
googleearth | Locates the image using Google Earth (the software must be installed on your computer for this to work). Supports multiple images selected at once. Example: | ||||||||||||
kml | Locates the image using the default handler for .kml (Keyhole Markup Language) files on your computer. This is the format Google Earth uses; indeed, this option does exactly the same thing as the googleearth option does except that it doesn't specifically check for the existence of Google Earth (and so will work with any app that implements default handling for .kml files). Example: | ||||||||||||
osm | Locates the image using Open Street Map (will open in a web browser). Example: | ||||||||||||
windowsmaps | Locates the image using Windows Maps (included by default in Windows 10). Supports multiple images selected at once (up to 25 maximum). Example: | ||||||||||||
menu | Generates a menu listing the configured location services. Selecting an item from the menu will launch the service to locate the selected image. Example: | ||||||||||||
nohide | Use this in conjunction with menu. By default services that are unavailable will be hidden from the menu - add the nohide parameter to disable them rather than hiding them. Example: | ||||||||||||
NOADDSUFFIX | /S | (no value) | Specify NOADDSUFFIX in conjunction with a preset to override the saved setting. Example: | ||||||||||
NOAUTORUN | /S | (no value) | Even if the other arguments on the command line would allow for automated image conversion, if NOAUTORUN is specified the conversion dialog will open first. This lets you use the other arguments to pre-configure the dialog but then make final adjustments manually. Example: | ||||||||||
NOENLARGE | /O | (no value) | Prevents images from being enlarged if the resize operation would otherwise cause this. Selected images that are already smaller than the specified size will remain untouched. Example: | ||||||||||
no | Specify NOENLARGE=no in conjunction with a preset to override the saved setting. Example: | ||||||||||||
NOLOSSLESS | /O | (no value) | Disables the ability of Opus to perform lossless JPEG rotation. Normally Opus will rotate JPEG images losslessly if possible, but you may specifically want to recompress the image to a lower quality (to make it smaller) and this keyword allows you to do that. You can also use this without performing a rotation, if all you want to do is recompress a JPEG image to a different quality setting. Example: | ||||||||||
no | Specify NOLOSSLESS=no in conjunction with a preset to override the saved setting. Example: | ||||||||||||
NOREDUCE | /O | (no value) | Prevents images from being reduced in size if the resize operation would otherwise cause this. Selected images that are already larger than the specified size will remain untouched. Example: | ||||||||||
no | Specify NOREDUCE=no in conjunction with a preset to override the saved setting. Example: | ||||||||||||
NORENAME | /S | (no value) | Specify NORENAME in conjunction with a preset to override the saved setting. Example: | ||||||||||
NOUSEIMAGEDATA | /S | (no value) | When used with the CONVERT argument (in the standalone image viewer), overrides the @useimagedata command modifier and makes the image converter load the image from disk rather than obtaining it from the viewer. Example: | ||||||||||
PERCENT | /K/N | <resize percent> | Resize the image to the specified percentage of the original size. This can enlarge images as well as reduce them. You can set this to 0 or 100 to disable percentage resizing and override the settings in a saved preset. Example: | ||||||||||
PRESERVEASPECTRATIO | /O | (no value) | Preserve the original aspect ratio when resizing images. The output width or height will be automatically adjusted to ensure the aspect ratio is maintained. Using this switch means you can resize an image by just supplying a new width or a new height - this missing dimension will be calculated automatically. Example: | ||||||||||
no | Specify PRESERVEASPECTRATIO=no in conjunction with a preset to override the saved setting. Example: | ||||||||||||
PRESERVEDATE | /S | (no value) | When converting images, this option preserves the creation and last modified timestamps of the original file. By default, when this option is not specified, the last modified timestamp will be updated to the current time, as will the creation timestamp if the operation creates a new file. (Operations which convert an existing file "in place", overwriting the original with REPLACE HERE, will preserve the creation timestamp regardless of this option.) Example: | ||||||||||
PRESET | /K | <name> | Invokes a saved preset on selected images. Presets can be created via the user interface (run Example: | ||||||||||
!default | Use this to display the conversion dialog with its default settings. Otherwise, if no preset is specified, the last used settings are loaded. Example: | ||||||||||||
!list | Generates a list of saved presets. Selecting a preset from the list will run it on all selected images. Example: | ||||||||||||
!menu | Generates a menu of saved presets. Selecting a preset from the menu will run it on all selected images. Example: | ||||||||||||
QUALITY | /K/N | <quality> | Specify the quality (1 - 100) when an image is saved in JPEG format. Example: | ||||||||||
REPLACE | /O | (no value) | Automatically replaces existing files in the destination folder. Use this in conjunction with the HERE argument to convert an image "in-place". This only applies if the output filename is the same as the input filename - if the output filename has changed (via ADDSUFFIX, etc) and the file already exists, you will still be prompted for confirmation. Example: | ||||||||||
always | Always replace existing files, even if the output filename has changed. Example: | ||||||||||||
no | Specify REPLACE=no in conjunction with a preset to override the saved setting. Example: | ||||||||||||
readonly | Replace existing files, even if they are read-only, without prompting. (Has no effect if read-only prompts are turned off in Preferences.) Example: Can be combined with always: Example: | ||||||||||||
ROTATE | /K | <angle> | Rotate the image the specified angle (in degrees). Positive values rotate clock-wise, negative values counter-clockwise. You can set this to 0 to disable rotation and override the saved setting within a preset. Example: | ||||||||||
EXIF | Uses the rotation (orientation) information stored in the images' EXIF tags to rotate the image. The effect of this is to negate the original orientation of the camera, resulting in a "right way up" image. If the selected image does not have an EXIF rotation tag this operation has no effect. Example: | ||||||||||||
RESET | Does not actually rotate the image data, but will clear out the rotation (orientation) field from the images' EXIF tags. Example: | ||||||||||||
TO | /K | <destination path> | Specifies the destination path for converted images. Remember to enclose the path in quotes if it contains spaces. If not provided, and the HERE argument is not specified, the current destination file display will be used as the target path. Example: | ||||||||||
TODEST | /S | (no value) | Forces the output to go to the current destination folder. This lets you override the saved destination within a preset. Example: | ||||||||||
WIDTH | /K/N | Resize the image to the specified width. Example: |
最后更新于