Debenu Quick PDF logo

SetImageMask

Image handling, Page layout

Description

Sets the mask for the selected image. This can be used to make parts of an image transparent when it is drawn with the DrawImage or DrawScaledImage functions.

The color range specified will become transparent. This works best with losslessly compressed images such as BMP or TIFF.

JPEG images use a lossy compression, so the image mask may cause halo effects.

The values of the color parameters range from 0 to 1, with 0 indicating 0% and 1 indicating 100% of the color. For monochrome images only the red component will be used.

Syntax

Delphi

function TDebenuPDFLibrary1511.SetImageMask(FromRed, FromGreen, FromBlue, ToRed, 
  ToGreen, ToBlue: Double): Integer;

ActiveX

Function DebenuPDFLibrary1511.PDFLibrary::SetImageMask(FromRed As Double,
  FromGreen As Double, FromBlue As Double, ToRed As Double,
  ToGreen As Double, ToBlue As Double) As Long

DLL

int DPLSetImageMask(int InstanceID, double FromRed, double FromGreen,
  double FromBlue, double ToRed, double ToGreen, double ToBlue)

Parameters

FromRed The red component of the starting color for the mask
FromGreen The green component of the starting color for the mask
FromBlue The blue component of the starting color for the mask
ToRed The red component of the ending color for the mask
ToGreen The green component of the ending color for the mask
ToBlue The blue component of the ending color for the mask

Return values

0 No image was selected
1 The image mask was set successfully

Copyright © 2014 Debenu. All rights reserved. AboutContactBlogNewsletterSupport