summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Collapse)Author
2016-10-19Make document handler declarations internal.Sebastian Rasmussen
2016-10-18Internal drop functions don't need to check for NULL.Sebastian Rasmussen
2016-10-18All external drop functions handles NULL.Sebastian Rasmussen
2016-10-18Avoid checking argument to fz_drop_*()/fz_free().Sebastian Rasmussen
As fz_drop_*()/fz_free() all must handle NULL.
2016-10-18Drop scaled pixmap later in draw_fill_image_mask().Sebastian Rasmussen
Following the pattern in draw_fill_image().
2016-10-18Remove unused luminosity.Sebastian Rasmussen
2016-10-18tiff: Support stripped YCbCr images.Sebastian Rasmussen
2016-10-18tiff: Cosmetic cleanup of code.Sebastian Rasmussen
In preparation for YCbCr support, rename some functions and make variable names more generic. Also remove fz_ prefix from static functions.
2016-10-16tiff: Plug pixmap leak should conversion fail.Sebastian Rasmussen
2016-10-16gif: Do not paste frame data if frame and image do not overlap.Sebastian Rasmussen
2016-10-16gif: Handle frames bigger than image correctly.Sebastian Rasmussen
The existing fix for bug 697161 introduced in commit 651c9f1d93c81c84deaf76debec0a30e54a67d7e was broken as frames would be constrained to the image size - 1. Now we decompress all available data, not suggesting an uncompressed size, but still checking the size after the uncomprsseion.
2016-10-16gif: Constrain frames to image boundaries.Sebastian Rasmussen
2016-10-16Avoid casting when dropping super objects.Sebastian Rasmussen
2016-10-14epub: Add hyperlinks.Tor Andersson
2016-10-14Be stricter when parsing css length units.Tor Andersson
2016-10-14Drop all contexts the same way.Sebastian Rasmussen
* Handle multiple calls to fz_drop_colorspace_context() and fz_drop_font_context(). * Allow missing context in call to fz_drop_aa_context() and fz_drop_glyph_cache_context(). * Only drop font context objects when dropping the last reference. * Avoid unnecessary NULL checks.
2016-10-14pnm: Workaround for b/w PAM images with packed samples.Sebastian Rasmussen
2016-10-14pnm: Support b/w PAM images with alpha.Sebastian Rasmussen
2016-10-14pnm: PAM images have component inverted compared to PNM.Sebastian Rasmussen
2016-10-14pnm: Premultiply alpha for use in pixmap.Sebastian Rasmussen
2016-10-14pnm: Better guesses when tuple type is not specified.Sebastian Rasmussen
2016-10-14pnm: Interpret binary b/w image samples correctly.Sebastian Rasmussen
Commit c2acdba7e9b72e18afdd3aa8dfdf66088b1ea1be mistakenly inverted the interpretation of samples for both both binary and ascii b/w PNM images when, at the time, there was only a mistake for ascii images.
2016-10-14pnm: Prefer enum to strings when parsing tuple type.Sebastian Rasmussen
2016-10-14pnm: Prefer enum to strings when parsing header tokens.Sebastian Rasmussen
2016-10-14pnm: Throw exception if image is too big.Sebastian Rasmussen
2016-10-14pnm: Cosmetic reordering of code.Sebastian Rasmussen
2016-10-13Bug 696885: Handle subsampled components in openjpeg decoder wrapper.Robin Watts
Also add simple ycc to rgb conversion (stolen from Sebastian's code).
2016-10-12Optimise fz_new_buffer_from_image_as_png.Robin Watts
This function calls png_from_pixmap, an auxiliary function to do the work. This was done deliberately to allow us to make the optimisation of dropping the pixmap early if it is not required. This keeps the memory use down in the case when a color conversion is required. Sadly, I never appear to have made the trivial change to actually use it in this mode. Do that now.
2016-10-13crypt: Handle null pointer when dropping crypt object.Sebastian Rasmussen
Exposed by weird-jpx.pdf from bug 696885.
2016-10-12Bug 697065: Fix bug in CMYK -> RGB pixmap converter.Robin Watts
When caching the cmyk values used to generate a given rgb value, it is best to cache the values before processing.
2016-10-12Fix leak in fz_load_jpx_info.Robin Watts
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-12css: Remove unused variables.Tor Andersson
2016-10-12svg: Remove newlines from fz_warn messages.Tor Andersson
2016-10-12Remove unused function.Tor Andersson
2016-10-12Use pool allocator when parsing CSS.Tor Andersson
Fixes memory leaks when parsing throws exceptions and saves a lot of tiny mallocs for objects that have common life times.
2016-10-12Bug 696958: parse css hex colors that are missing the '#' prefix.Tor Andersson
2016-10-12Bug 696958: Workarounds for 'rem' and 'ch' units in epub.Tor Andersson
2016-10-12Remove superfluous context null checks.Tor Andersson
Code MUST pass a non-null context to all functions. Checking ctx for null and failing silently is no more useful than segfaulting. fz_keep_imp and fz_drop_imp handle NULL pointers safely, so the NULL checks for this can also be dropped at the same time.
2016-10-12Fix (harmless) typo in function prototypes.Tor Andersson
2016-10-12Split fz_html into fz_html and fz_html_box for nodes.Tor Andersson
Removes the need to carry fz_pool along in all boxes.
2016-10-12Bug 697012: Avoid overflow in xps_parse_real_num.Robin Watts
2016-10-12Bug 696939: Fix mutool info -I flag.Robin Watts
When using -I without -X we were not seeing the expected images listed. Adopt the solution suggested by the bug reporter. Many thanks!
2016-10-12Change code from using bandheight to using band_height.Robin Watts
Keep to our naming conventions.
2016-10-12Regularize band writer interface.Robin Watts
We have various functions that, for different image formats, write a header, then a band, then (sometimes) a trailer. Push them all through a single interface. This change also fixes potential problems caused by the trailer writing being an implicit destructor, which can cause problems in cleanup code if the trailer writing throws an error.
2016-10-12Always call fz_drop_document() to drop the document.Sebastian Rasmussen
2016-10-11Free document in fz_drop_document(), not in subclassing documents.Sebastian Rasmussen
2016-10-10Bug 697050: Allow mutool extract to keep JPEGs as JPEGs.Robin Watts
If an image is a JPEG (without a mask, or a colorkey, or using decode), then extract it as such.
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-10-10Remove unused variable.Robin Watts