Color scheme: Dark
You are here: start » en » Documentation » Microsoft Access development tools » WKL Forms Object Library » Media » WklImage

WklImage

A picture control for SVG and bitmaps: symbols and drawings in SVG stay sharp at every size and in print, single-color SVG symbols take a color of the form, and the picture can come from a file, from the database's image gallery, from SVG text or from a field.

Get started

None

Common tasks

Visual aid

┌──────────────────────────────┐
│                              │
│        ╱╲                    │
│       ╱  ╲      ①            │
│      ╱____╲                  │
│                            ② │
└──────────────────────────────┘
RegionMeaning
①The picture of Source - or of Value when the control is bound and the field is not Null - placed by SizeMode: zoomed with its aspect ratio (default), stretched, or at its natural size. In SVG pictures currentColor takes SvgColor.
②The background (BackColor), visible where the picture is transparent or does not reach. When the picture cannot be shown, the reason stands here and in ErrorText.

Key features

  • SVG through Direct2D. Windows draws the SVG (Windows 10 version 1703 or later); no browser, no converter. Paths, basic shapes, gradients and transforms; text and filter effects of SVG are not drawn.
  • Bitmaps and metafiles. PNG, JPEG, BMP, GIF, ICO, EMF and WMF through GDI+.
  • Four sources. A file (relative paths start at the folder of the database), a shared image of the database by name, SVG text, or a data URI. URLs (http:, https:) are refused; a file path may also name a network share (UNC) and is read like a local file.
  • Bound. With a Control Source the field supplies the source text or the bytes of a picture per record.
  • Color of symbols. SvgColor replaces currentColor, the convention of icon sets.
  • Errors stay in the control. A missing file or a damaged picture shows its reason instead of a dialog.

Core concepts

The source text is classified once (SVG text, data URI, file, shared image) and loaded when the control is drawn next, so a form opens before files are read and a shared image can be read from the database the control belongs to. For SVG the framework's core reads the natural size from width, height and viewBox, adds a viewBox where a file has only a size, and sets the aspect ratio rule of the size mode; Direct2D then draws the document into the control's device context. On a printer the picture is drawn at 300 dpi.

Administration

Troubleshooting

None

For developers

en/wiki/msaccess/comctl/media/image/start.txt · Last modified: by Wolfgang van der Stille