plug-in-photocopy

Spencer Kimball

Description

Simulate color distortion produced by a copy machine

Help

Propagates dark values in an image based on each pixel's relative darkness to a neighboring average. The idea behind this filter is to give the look of a photocopied version of the image, with toner transferred based on the relative darkness of a particular region. This is achieved by darkening areas of the image which are measured to be darker than a neighborhood average and setting other pixels to white. In this way, sufficiently large shifts in intensity are darkened to black. The rate at which they are darkened to black is determined by the second pct_black parameter. The mask_radius parameter controls the size of the pixel neighborhood over which the average intensity is computed and then compared to each pixel in the neighborhood to decide whether or not to darken it to black. Large values for mask_radius result in very thick black areas bordering the regions of white and much less detail for black areas everywhere including inside regions of color. Small values result in less toner overall and more detail everywhere. Small values for the pct_black make the blend from the white regions to the black border lines smoother and the toner regions themselves thinner and less noticeable; larger values achieve the opposite effect.


Type

unknown

Parameters

Type Name Description
PF_INT run-mode The run mode { RUN-INTERACTIVE (0), RUN-NONINTERACTIVE (1) }
PF_IMAGE image Input image (unused)
PF_DRAWABLE drawable Input drawable
PF_FLOAT mask-radius Photocopy mask radius (radius of pixel neighborhood)
PF_FLOAT sharpness Sharpness (detail level) (0.0 - 1.0)
PF_FLOAT pct-black Percentage of darkened pixels to set to black (0.0 - 1.0)
PF_FLOAT pct-white Percentage of non-darkened pixels left white (0.0 - 1.0)

Return

None