summaryrefslogtreecommitdiff
path: root/source/fitz
AgeCommit message (Collapse)Author
2017-10-24Make sure shades use proper "default" color space.Michael Vrhel
Fixes some issues in Altona test file.
2017-10-24Avoid using overprinting routines unnecessarily.Robin Watts
2017-10-24Only allow overprint when color spaces are subtractive.Michael Vrhel
Fixes on issue on page 14 of altona test.
2017-10-24Look for changes to Default colorspaces in XObjects.Robin Watts
2017-10-24Fix overprint color component detection.Robin Watts
If a colorant is not an explicit separation, then it will be mapped down to process colorants. These cannot be protected from overprint. Incorporates a fix for a problem with shades seen on page 8 of. Altona_Technical_v20_x4. This shows a problem where we were failing to correctly overprint a grey gradient with a spot color one. The overprint setup code was checking for 'Orange' being one of the process colours, and not finding it. Consequently it was deciding that Orange would have to be mapped to a process color, and so the process colors could not be protected from overprint. The code should have spotted that 'Orange' was one of the spot colors. With this added, it works correctly.
2017-10-24Don't apply default decode array to ICC Lab image data.Robin Watts
Adjust the decode array to allow for the fact that the default decode is done by the ICC code.
2017-10-24Only do proof conversion in final pop.Michael Vrhel
The proof conversion should only be done after we have done all our drawing in the separations group. Fixes issue in page 7 of Altona test.
2017-10-24Fix overprint with shadings.Robin Watts
2017-10-24Add FZ_ENABLE_SPOT_RENDERING define.Robin Watts
2017-10-24Implement DeviceGray to KMichael Vrhel
When source color is DeviceGray, and the destination color CMYK we should map the gray values to K. See note in Section 6.3 of PDF spec.
2017-10-24Overprint support.Robin Watts
Introduce an fz_overprint bitmap (currently just a uint32_t, but it'll grow to be an array of them if FZ_MAX_COLOR is increased). Pointers to this are passed into all our painting routines. NULL means "Do what you've always done before, with no overprint". non NULL, means that every set bit means "don't ever alter this component". We therefore set the overprint bitmap up according to the input color/colorspace/colorparams before calling each routine.
2017-10-24Change colorspace 'device_n' field to be a flags word.Robin Watts
2017-10-24Logic for Sep and DeviceN colorspaces with C,M,Y, or K.Michael Vrhel
Special care is required when the DeviceN color space has cyan, magenta, yellow or black. For example, even if we support separations in the destination, if the color space has CMY or K as one of its colorants and we are drawing to an RGB or Gray pixmap we will want to do the tint transform. Also if the pixmap has no seps memember present, we support the separations if the destination is CMYK and the DeviceN colorspace has no "Spot" (non-CMYK) colorants.
2017-10-13Add fz_deflate family of functions.Robin Watts
This gives us a friendlier interface to zlib. Simplifies PNG output and PCLM output code.
2017-10-13Rename internals of flate filter.Robin Watts
This is to avoid conflict with the next commit.
2017-10-13Simple PCLm device.Robin Watts
Both bandwriter and document_writer interfaces cope with multi page docs. Update mudraw to output pclm format too. Incorporates fixes from Tor.
2017-10-13Fix further problem seen in PDF_2.0_FTS/fts_23_2311.pdfRobin Watts
This file has a type 3 font in it. It first uses a 'd1' glyph, that uses a pattern. Accordingly, we we render that pattern to a mask tile and store that tile. Then it uses a 'd0' glyph, which uses the same pattern. The cache is checked, and we erroneously pick up the cached tile to reuse it - but this is not a colored rendering, so we assert on plotting. The fix is to ensure that the required colorspaces match. This requires us to add the colorspace to the tile key. Unfortunately, this means that colorspaces have to become key_storable, so the patch is slightly larger than would otherwise be the case.
2017-10-13Fix assert in fts_23_2311.pdfRobin Watts
Ensure that if we ask for a color converter for a NULL colorspace, that we treat it as devicegray. This copes with the mask cases.
2017-10-12Refactor image format magic signature recognition into its own function.Tor Andersson
2017-10-12Change default scalable SVG resolution.Tor Andersson
HTML doesn't respect the DPI setting, so SVG images end up too big.
2017-10-12Fix bug in murun when creating buffers from strings.Tor Andersson
The code only worked for string literals, not garbage collected or short strings.
2017-10-12Some more consts.Tor Andersson
2017-10-12Make fz_open_memory take a const buffer.Tor Andersson
2017-10-12Make image loading use const data pointers.Tor Andersson
2017-10-05Fix out of bounds check in pnm parser.Sebastian Rasmussen
2017-10-05Remove shadowed variables.Sebastian Rasmussen
2017-10-05Avoid double literals and double math functions.Sebastian Rasmussen
2017-09-27Bug 698593: Fix assert in image painting.Robin Watts
2017-09-27Bug 698588: Short circuit plotting of images if alpha == 0.Robin Watts
2017-09-22Fix typo in default output format for pixmap output in muconvert.Tor Andersson
2017-09-22Fix places where we assign state without using it.Robin Watts
Sebastian points out that at various points we assign state only to overwrite it without using it later on. Harmless, but fixed here for neatness. Thanks.
2017-09-22Ensure PNG output is not premultiplied output.Robin Watts
2017-09-20tiff: Support images with 24/32 bits per component.Sebastian Rasmussen
2017-09-20Initialize libjpeg state to avoid crashes upon error.Sebastian Rasmussen
Previously, in case of error in fz_jpg_mem_init(), jpeg_finish_decompress()/jpeg_destroy_decompress() would be called before jpeg_create_decompress() had initlized all state. This sometimes led to segfaults or accessing uninitialized data.
2017-09-20Disable further device calls upon error while closing device.Sebastian Rasmussen
2017-09-20Drop rasterizer upon error while bounding path.Sebastian Rasmussen
2017-09-20Fix optional alpha pixmap support in gamma correction function.Tor Andersson
2017-09-19Fix 698540: Check name, comment and meta size field signs.Tor Andersson
2017-09-13Consistently drop filter chain upon error.Sebastian Rasmussen
2017-09-12Update draw-blend.c to support spot blending.Michael Vrhel
Proper blending of spots is dependent upon the blending color space as well as the blend mode. In particular when the blend mode is non-separable or non-white preserving normal blending should be used for the spot colorants. Incorporates various fixes and optimisations squashed back to this one commit for clarity. Some of these fixes/optimisations are due to Michael Vrhel. In particular we move to handling non-isolated groups in the same way as gs.
2017-09-12Fix whitespace in draw-blend.cRobin Watts
2017-09-12Fix Gradients in the presence of spots.Robin Watts
Incorporates fixes from Michael: When dealing with spot colors, if the destination space is pure CMYK and we have unsupported spots we can do a weighted addition of the spot CMYK colorant like Adobe does in the PSD image format. If the destination space is RGB we need to do a traditional color mapping of each pixel.
2017-09-12Fix separation pixmap conversion functions for DeviceN.Robin Watts
2017-09-12Clean up cached color converters in case of error.Sebastian Rasmussen
2017-09-08Ensure colorspace colorants are named for ICC spaces too.Robin Watts
2017-09-08Start to rework plotters.Robin Watts
2017-09-08Update fz_separations equivalent color mechanism.Robin Watts
Incorporates fixes from Michael. Rather than specifically giving it rgb and cmyk values, separations now include the colorspace. Conversions can then be done into ANY colorspace we need. Note, that we maintain the old way of working for the gproof device. Also, fix pdf_page_separations to correctly find all separations. This involves recursively looking through colorspaces, forms and shadings for colorspaces therein, making sure we don't run into any circular references. We do 2 passes, so that we can pick up as many colorants as Separations as possible. On the second pass we pick up any colorants we missed in terms of DeviceN spaces. The purpose of this is to try to ensure that we get as many tint transforms as single input functions as we can. This may not be important in the grand scheme of things, but seems neater.
2017-09-08Update draw device to cope with spots.Robin Watts
If draw device is passed a pixmap with disabled separations, it may have to push an extra group at the top to allow for the actual rendering to properly happen in cmyk+spots, and then get folded down at the end. This pushing cannot happen at create time, due to it being dependent on the defualt_cs settings. Accordingly, we push it (just once) on the first drawing operation. This means we need to be able to convert from "colorspace + set of spots" to "different colorspace + different set of spots". This in turn means we need to be able to drive lcms slightly differently (to tell it whether to copy the spots unchanged or not), so we have to amend the CMS interface code a bit for that. Currently we lack plotters to properly cope with plotting images and shades with spots, so this will give a warning and do nothing. To be filled in in future commits. Ensure fz_get_icc_link accepts NULL to mean default color params. Incorporates fixes from Michel Vrhel: With transparency groups we can have RGB + spot pixmaps. When drawing into those we need a mixture of colorant polarity. Ensure that fz_convert_separation_colors takes account of this. Fix C1 of Altona_Technical_1v1_x3.pdf (allow for output intent in fz_clone_pixmap_area_with_different_seps).
2017-09-08Squash 64bit build warning.Robin Watts
2017-09-08Remove unnecessary conditional.Robin Watts
The conditional is always == 255 here.