Skip to main content
Skip table of contents

IDOMImage Filters


Introduction

Mako provides several filters that operate on an IDOMImage. These are both convenient and powerful, making complex image processing a matter of a few lines of code.

For example, when Mako loads a CMYK JPEG, the image is inverted. The simplest way to solve this is to add an inverter:

CPP
const IJawsMakoPtr mako = IJawsMako::create();
...
if (newImage->getImageType() == eDITJPEG && newImage->getImageFrame(gMako)->getNumChannels() == 4)
    newImage = IDOMFilteredImage::create(mako, newImage, IDOMImageInverterFilter::create(mako));
C#
var mako = IJawsMako.create();
...
if (newImage.getImageType() == eDOMImageType.eDITJPEG && newImage.getImageFrame(mako).getNumChannels() == 4)
    newImage = IDOMFilteredImage.create(mako, newImage, IDOMImageInverterFilter.create(mako));
JAVA
var mako = IJawsMako.create();
...
if (newImage.getImageType() == eDOMImageType.eDITJPEG && newImage.getImageFrame(mako).getNumChannels() == 4)
    newImage = IDOMFilteredImage.create(mako, newImage, IDOMImageInverterFilter.create(mako));

Table of filters

Filter

Purpose

IDOMImageChannelSelectorFilter

An image filter that presents optionally an image stripped of alpha, or alternatively a Gray image representing the extra channel (i.e., Alpha or Mask) or a device color space channel.

IDOMImageColorSpaceSubstitutionFilter

An image filter that presents an identical image, just with the colorspace substituted.

IDOMImageColorConverterFilter

An image filter that presents a color converted version of an image. The target color space. Must be a base space; i.e., no DeviceN or Indexed spaces.

IDOMImageBleederFilter

An image filter that presents an image with the edge pixels repeated. Useful for cases where consumers may interpolate pixels at the edge, creating unwanted artifacts.

IDOMImageDownsamplerFilter

An image filter that presents a downsampled version of an image, using subsample, average or bicubic downsampling.

IDOMImageMaskExpanderFilter

An image filter that presents an image source and color combination as a plain image with an alpha channel, with all pixels colored with the given color. Useful for simplifying an IDOMMaskedBrush where the brush masked by the image is a solid color.

IDOMImageDeindexerFilter

An image filter that presents an image with an Indexed color space as a simple 8-bit image.

IDOMImageDeviceNToBaseFilter

An image filter that presents an image with a DeviceN color space as a simple image in the alternate space.

IDOMImageSpotMergerFilter

An image filter that merges selected spot components into the process components of an image.

This is conceptually similar to IDOMImageDeviceNToBaseFilter, but:

  • It allows only some components to be merged into the process components, and does not apply a tint transform. Instead, the spot colorants are merged into the process based on the color information provided via a kind of transparency blending.
  • It allows some spot colorants to be dropped entirely.
  • It provides a convenient method for dropping a single colorant while preserving all other spot components. While this is not merging per se, it can be useful.
  • It optionally will convert process components to another color space.

IDOMImageInverterFilter

 An image filter that presents a bitwise inverted form of the source image.

IDOMImageMatteRemoverFilter

An image filter that removes a Matte and undoes premultiplication for a PDF Matte'd image and soft mask. The resulting image does not have alpha, and can be used with the mask to generate the desired result.

IDOMImageBitScalerFilter

An image filter that presents an image as an image with a different bits-per-sample, e.g. converting a 16-bit image to 8-bit.

IDOMImageColorKeyFilter

An image filter that presents a masked image where colors within a given range are masked out, analogous to a green screen. The source image must not have a mask or alpha channel.

IDOMImageDecodeFilter

An image filter that applies a PDF/PS style Decode array to the image contents. For details on decode arrays, please see "Decode Arrays" on page 344 of the PDF Reference, version 1.7. The bit depth of the result may be promoted to 8- or 16-bits per component, depending on the situation.


JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.