Grayscale remapping (also known as tone scale adjustment) is used to change the
darkness of different colors in a document. Among other things it may be used to
lighten images that are too dark or increase the contrast.
To enable the remapping of the darkness of color objects (lines, rectangles and outline
graphics), PDFIN_REMAP_COLOR=YES needs to use. If the document contains color
images, INPUT_COLOR_IMAGES=YES is also necessary.
The graph shows a possible grayscale remapping (compared against the line
representing no remapping). This would lighten colors whose darkness is less than
70% and darken colors whose darkness is greater than 70%.
If there are 11 values entered in PDFIN_REMAP, the key points would divide the range
into 10 sections. If PDFIN_REMAPMAX=100, the key points would be spaced at intervals
The values along the horizontal axis of the graph represent the shades in the original,
The values along the vertical axis represent the density values to which the various
original shades are to be adjusted.
The densities in the illustration range from 0 (white) to 100 (black).
The straight line from 0,0 to 100,100 represents the unadjusted scale, where the input
level and the adjusted level would be identical. This would equate to a PDFIN_REMAP
setting of 0,10,20,30,40,50,60,70,80,90,100.
The undulating line represents an adjustment that would equate to a setting of
0,0,5,10,20,35,60,70,85,100,100 of ʹadjusted gray levelʹ against ‘points input gray levelʹ.
This would result in a lightening of the darker 70% of the image tone scale and adarkening of the lighter 30%. The density of all the grays in the darkest 10% of the
original grayscale would be increased to black, whilst the lightest 10% would be
lightened to white. The densities from 10 ‐ 70 would be decreased (lightened) in
varying degrees, whilst from 70 ‐ 90, the densities would be increased (darkened).
Two options control the remapping:
Specifies the maximum value of both the input grey level and the adjusted grey level. The default is 100. It is probably best to always use PDFIN_REMAPMAX=100.
Specifies the remapping. For example, to specify the remapping shown above, PDFIN_REMAP=0,0,5,10,20,35,50,70,85,100,100 would be used.
The numbers listed in the PDFIN_REMAP option represent the remapping at equally
spaced intervals between 0 and PDFIN_REMAPMAX. In the above example, the eleven
values represent the remapping at intervals of 10. The remapping is linearly
interpolated between these points.
increases the contrast in an image, making the shades below 50% lighter and those above 50% darker.
creates a negative image, mapping black to white and vice versa, and linearly remapping grayscales in between.