Resampling is a method used to resize graphics images, particularly raster images like GIF, JPG, BMP, and PNG. When you use resampling the process tends to create a smoother image when the size increases or decreases. To increase the size of an image, more pixels are added to the image, though these new pixels refer to the pixels that are already present. That is, you can’t add more detail than was already in the graphic, so resampling can be used to make the image bigger, but it loses resolution in the process. Using resampling to reduce the size of an image removes pixels to condense the content, also reducing the resolution.
This sample program shows how to create a program that can find and resample images in a PDF file automatically. You can provide your own PDF input file, or use the default PDF document named in the sample program, and stored in the Resources/Sample_Input directory.
Masking is a means to edit a photo or drawing to change or remove a feature, or change the background. For example, you might want to edit a photo to remove someone from a group portrait, or even add another person. You might want to add color to a black and white image, or change the color of part of a photo. Masking allows you to select a section of a photo or other image so that you can edit or remove that part of the image, while leaving other parts of the image unchanged. The program will generate a PDF output file.
The SoftMask object in the PDF format allows you to place an image on a PDF page and control the level of transparency of that image. You can provide settings to determine how much of the background color or text on the page shows through the SoftMask image appearing in the foreground.
For more information about soft masks, see Section 188.8.131.52, “Mask Shape and Opacity,” in the ISO 32000 Reference, 1.7, page 345. This document is found on the web store of the International Standards Organization.
This API creates a PDF file with an image shown with a shading gradient.
The program creates a PDF file showing a gradient from black to red:
This sample program demonstrates how to create a common design element. Gradients like this are used in a variety of contexts for printing and display.