Skip to content

TTMSFMXNativeUIImageView

Usage

A TMSFMXNativeUIImageView object provides a view-based container for displaying a single image.The TMSFMXNativeUIImageView supports following image formats:

  • Tagged Image File Format (TIFF): .tiff, .tif
  • Joint Photographic Experts Group (JPEG): .jpg, .jpeg
  • Graphic Interchange Format (GIF): .gif
  • Portable Network Graphic (PNG): .png
  • Windows Bitmap Format (DIB): .bmp, .BMPf
  • Windows Icon Format: .ico
  • Windows Cursor: .cur
  • XWindow bitmap: .xbm

Properties

Property name Description
Bitmap Sets the image of an ImageView.
BitmapFile A direct link to an image file located in the root or documents directory.
BitmapLink A link to another TBitmap instance which can be used multiple times to save resources.
ContentMode The way the image is displayed inside the boundaries of the control, with various options such as aspect ratio, stretching and centering.
Visible Shows / hides the ImageView.
URL Loads an Image from an URL.

Methods

Method name Description
DetectFaces Method which detect faces in an image. Each face is stored in the Faces collection.
ShowFaces Method which detects and marks faces on the image. Each face is stored in the Faces collection

Public Properties

Property name Description
DefaultSizeFactor The factor that is applied to the size of the face in order to create a left eye, right eye and mouth rectangle part. These values can be retrieved through the Faces collection.
Faces A collection of faces when calling DetectFaces or ShowFaces. Each face contains information about the position of the left eye, right eye and mouth part. Starting from iOS7, the information can also contain if the eye is closed, the face is smiling and the face angle
ImageView Returns a reference to the native iOS UIImageView.
LeftEyeColor The color to indicate the left eye after detection of the face.
MouthColor The color to indicate the mouth after detection of the face.
RightEyeColor The color to indicate the right eye after detection of the face.

Face Detection

The ImageView supports face detection when an appropriate image is loaded. Call DetectFaces to fill the Faces collection or call ShowFaces to fill the collection and display a rectangle for each face in combination with the left eye, right eye and mouth part ellipses. Additionally parameters can be passed to the DetectFaces or ShowFaces call to allow a lower accuracy, a minimum face size to detect and / or an image orientation from which to start searching. Starting from iOS 7, parameters can be added to detect an eye blink and / or a smile. Below is a sample that demonstrates calling the default ShowFaces call on an image:

TMSFMXNativeUIImageView