10.07.2015 Views

Download - Multivac!

Download - Multivac!

Download - Multivac!

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

BMP> PNG> JPEG> TIFF> GIFFor images with an RGB palette, colorizing is only reasonable when the palette containsonly gray values, and the palette index is identical to the gray value.In order to colorize an image with a spot color you must supply the colorize optionwhen loading the image, and supply the respective spot color handle which must havebeen retrieved with PDF_makespotcolor( ):p.setcolor("fillstroke", "cmyk", 1, .79, 0, 0);spot = p.makespotcolor("PANTONE Reflex Blue CV");String optlist = "colorize=" + spot;image = p.load_image("tiff", "image.tif", optlist);if (image != -1){p.fit_image(image, x, y, "");}6.1.6 Multi-Page Image FilesPDFlib supports TIFF files which contain more than one image, also known as multipagefiles. In order to use multi-page TIFFs, additional string and numerical parametersare used in the call to PDF_load_image( ):image = p.load_image("tiff", filename, "page=2");The page option indicates that a multi-image file is to be used. The last parameter specifiesthe number of the image to use. The first image is numbered 1. This option may beincreased until PDF_load_image( ) returns -1, signalling that no more images are availablein the file.Cookbook A full code sample for converting all images in a multi-image TIFF file to a multi-page PDF filecan be found in the Cookbook topic images/multi_page_tiff.6.1.7 OPI SupportWhen loading an image additional information according to OPI (Open Prepress Interface)version 1.3 or 2.0 can be supplied in the call to PDF_load_image( ). PDFlib accepts allstandard OPI 1.3 or 2.0 PostScript comments as options (not the corresponding PDF keywords!),and will pass through the supplied OPI information to the generated PDF outputwithout any modification. The following example attaches OPI information to animage:String optlist13 ="OPI-1.3 { ALDImageFilename bigfile.tif " +"ALDImageDimensions {400 561} " +"ALDImageCropRect {10 10 390 550} " +"ALDImagePosition {10 10 10 540 390 540 390 10} }";image = p.load_image("tiff", filename, optlist13);128 Chapter 6: Importing Images and PDF Pages

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!