summaryrefslogtreecommitdiff
path: root/source/fitz/draw-unpack.c
AgeCommit message (Collapse)Author
2017-04-27Include required system headers.Tor Andersson
2016-10-12Bug 697151: Pacify valgrind when reading padding while unpacking tilesSebastian Rasmussen
If e.g. an 18 x 11 PNG image used 1 bit depth and a single component the source data fed to fz_unpack_tile() would have padding bits at the end of each line of whole bytes, because 18 bits is not a multiple of 8. The optimized 1 component versions of fz_unpack_tile() for a bit depth of 1 deliberately read the padding when doing the table lookups, knowing that this does not matter because of the construction of the table. Valgrind is incapable of understanding this, so we provide some extra masking (used only in PACIFY_VALGRIND builds) that explicitly mask off the invalid bits.
2016-10-10PDF Images: Add a flag for if we need to apply the decode arrayRobin Watts
This avoids us having to check the entire array each time, and makes the next commit simpler.
2016-09-16fz_unpack_tile now skips extra input components.Sebastian Rasmussen
This is useful when a TIFF image is grayscale but supplies more than a single component per sample.
2016-06-17Use 'size_t' instead of int as appropriate.Robin Watts
This silences the many warnings we get when building for x64 in windows. This does not address any of the warnings we get in thirdparty libraries - in particular harfbuzz. These look (at a quick glance) harmless though.
2016-05-26Avoid unnecessary alphas when decompressing images from streams.Robin Watts
2016-05-24Fix fz_decode_tile in the absence of alpha.Robin Watts
When no alpha present, we were omitting to decode the last component.
2016-05-24fz_pixmap revamp: add stride and make alpha optionalRobin Watts
fz_pixmaps now have an explicit stride value. By default no change from before, but code all copes with extra gaps at the end of the line. The alpha data in fz_pixmaps is no longer compulsory. mudraw: use rgb not rgba (ppmraw), cmyk not cmyka (pkmraw). Update halftone code to not expect alpha plane. Update PNG writing to cope with alpha less input. Also hide repeated params within the png output context. ARM code needs updating.
2016-01-13Add lots of consts.Robin Watts
In general, we should use 'const fz_blah' in device calls whenever the callee should not alter the fz_blah. Push this through. This shows up various places where we fz_keep and fz_drop these const things. I've updated the fz_keep and fz_drops with appropriate casts to remove the consts. We may need to do the union dance to avoid the consts for some compilers, but will only do that if required. I think this is nicer overall, even allowing for the const<->no const problems.
2015-02-17Add ctx parameter and remove embedded contexts for API regularity.Tor Andersson
Purge several embedded contexts: Remove embedded context in fz_output. Remove embedded context in fz_stream. Remove embedded context in fz_device. Remove fz_rebind_stream (since it is no longer necessary). Remove embedded context in svg_device. Remove embedded context in XML parser. Add ctx argument to fz_document functions. Remove embedded context in fz_document. Remove embedded context in pdf_document. Remove embedded context in pdf_obj. Make fz_page independent of fz_document in the interface. We shouldn't need to pass the document to all functions handling a page. If a page is tied to the source document, it's redundant; otherwise it's just pointless. Fix reference counting oddity in fz_new_image_from_pixmap.
2013-06-20Rearrange source files.Tor Andersson