VDS Renaissance のインターフェースは複数の言語に対応しています。公式ドキュメントは、単一で一貫した常に最新のリファレンスを保証するため、英語で管理されています。

Image extension (vdsimg70)

Windows Linux macOS

[VDS7] The vdsimg70 extension is the single, native image module of VDS Renaissance — one DLL (32 and 64-bit) for all image work. It has two faces in the same DLL: image processing (headless: load, transform and save image files) through the image command and @image function, and the IMAGE display element for showing pictures on a dialog. It is built on FPC fcl-image (no external dependency, cross-platform).

Loading the extension

#define command,image
#define function,image
EXTERNAL vdsimg70

The logical name vdsimg70 resolves automatically to vds32img70.dll / vds64img70.dll of the running bitness, so the same script is portable across 32 and 64-bit.

Anywhere a <file> is expected, an http:// or https:// URL is also accepted (downloaded natively).

Image processing — the image command

Images are held in numbered handles 1 to 32 (like string lists).

Sub-command Effect
image convert,<in>,<out>{,<quality>} One-shot file conversion (no handle).
image load,N,<file> · image new,N,W,H · image save,N,<file>{,<quality>} · image close,N Open / create / write / release a handle.
image resize,N,W{,H} · image thumbnail,N,<max> · image crop,N,X,Y,W,H · image flip,N,H|V Geometry.
image rotate,N,<deg> 90/180/270 are exact; any other angle is a free rotation (enlarged canvas, bilinear).
image grayscale,N · image invert,N · image sepia,N · image bright,N,-100..100 · image contrast,N,-100..100 · image gamma,N,<f> Colour adjustments.
image blur,N{,<radius>} · image sharpen,N · image paste,N,<file>,X,Y Effects and compositing.
image watermark,N,<file>,TL|TR|BL|BR|CENTER{,<opacity>} Stamp a watermark image.
image text,N,X,Y,<text>,<size>,RRGGBB Draw text (built-in 8x8 bitmap font, scaled by <size>).

The @image function

Selector Returns
@image(width,N) / @image(height,N) Dimensions of handle N.
@image(info,<file>) width and height of a file without loading it.
@image(formats) The image formats supported.
@image(transitions) The display-element transitions, as number=name pairs.
@image(error) The error message of the last image operation (empty on success).

Supported formats: PNG, JPEG, BMP, GIF (read), TGA, TIFF, PNM.

Example — make a thumbnail

#define command,image
EXTERNAL vdsimg70
image load,1,photo.jpg
image resize,1,800
image watermark,1,logo.png,BR,40
image save,1,photo_web.jpg,85
image close,1

The IMAGE display element

[VDS7] The extension also provides the IMAGE dialog element — the modern, cross-platform replacement for the old image control (now 32 and 64-bit, with URL support and more transitions).

DIALOG ADD,IMAGE,<name>,<top>,<left>,<width>,<height>,<file|URL>,<tooltip>,<styles>
  • Styles: STRETCH (stretch to fill), RESIZE (fit, keeping the aspect ratio), CENTER (real size, centred), CLICK (raises a <name>CLICK event), plus a cursor style (HAND, CROSS, IBEAM, WAIT, ARROW).
  • Change the picture, optionally with a transition: image set,<name>,<file|URL>{,<transition>}.
  • Transitions (cross-platform subset, numbers/names compatible with earlier versions): 0 none, 1 Fade, 3 Expand from left, 7 Expand from center, 16/17/18/19 Slide left/right/top/bottom, 26/27/28/29 Reveal left/right/top/bottom, 82/83 Vertical/Horizontal blinds. @image(transitions) lists them.
  • Element queries: @image(<name>,size) returns width|height; @image(<name>,depth); @DLGPOS(<name>).

In the dialog designer the element appears in an Image palette tab (32 and 64-bit).

See also