summaryrefslogtreecommitdiff
path: root/source
AgeCommit message (Collapse)Author
2017-06-16MSVC: Avoid signed/unsigned warning.Robin Watts
2017-06-15Silence warning about not building a glyph bbox table.Tor Andersson
This is very common and not a problem. Let's keep warnings for problematic things, and not use them for informational messages such as these.
2017-06-15Make inline fz_write_*() normal public functions.Sebastian Rasmussen
This avoids a macOS compilation error due to strlen() being redeclared.
2017-06-13Add edgebuffer based rasterizerRobin Watts
2017-06-13Introduce fz_rasterizer encapsulationRobin Watts
This is intended to be a way to allow us to implement compiletime/runtime selection of different scan converter implementations.
2017-06-11Ensure TIFF images have the correct colorspace.Robin Watts
CMYK+Alpha get resolved to RGB+Alpha as part of loading.
2017-06-11When loading indexed PNG images, get the colorspace right.Robin Watts
2017-06-08Plug leak of opj decoder in case of fz_new_pixmap() throwing.Sebastian Rasmussen
2017-06-08Plug leak of PDF page object.Sebastian Rasmussen
2017-06-08Avoid using fz_var() when not necessary.Sebastian Rasmussen
2017-06-06Rename misnamed pdf object graft map keep interface.Sebastian Rasmussen
2017-06-06Declare functions without arguments as taking void.Sebastian Rasmussen
2017-06-06Remove unused variable/function.Sebastian Rasmussen
2017-06-03Tweak pdf_graft_map API.Robin Watts
Passing a pdf_document to pdf_graft_object to specify the source document is redundant, as if we need to know the document, it will be pickled into the object we are copying. Similarly, repeatedly having to pass the destination document seems silly when we can just pickle it into the map too (and this removes the possibility of people using a different destination document part way through). This leaves to simplifying the pdf_graft_object call, at the expense of splitting it into 2 calls - one with a map, and one without. Also, we can delay the creation of the mapping table until we are first asked to copy an object that requires deep copying. This avoids us ever having to manually pass in the source document. This has knock-on effects in the java and javascript classes, but with the advantage of being clearer in the end (IMHO). Conflicts: include/mupdf/pdf/document.h
2017-06-03Alphabetically sort mutool options.Robin Watts
2017-06-03Allow fz_set_user_css to accept NULL.Robin Watts
2017-06-03Add pdf_keep_document.Robin Watts
We have pdf_drop_document, so a pdf_keep_document seems justified too.
2017-06-03Add documentation for pdf_processors.Robin Watts
Expose pdf_new_output_processor. Remove pdf_document argument to pdf_new_filter_processor. It is only ever used when copying resources from the old resource dictionary to the new one, whereupon it must agree with the bound pdf_document in the old resource dictionary.
2017-06-03Remove forcing of isolate mode in clipping paths.Robin Watts
This causes breakages of rendering for non-rectangular clipping paths, as seen on page 10 of Transparency-DesignGuide.pdf in the "Knockout group on" image, if we disable the rectangular optimisation case in fz_draw_clip_path.
2017-06-03jpx: Use subsampled width when reading subsampled data.Sebastian Rasmussen
This bug caused an indeterminism with issue726.j2k.
2017-06-02tiff: Avoid dropping wild pointer in case of error.Sebastian Rasmussen
2017-06-01tiff: Check for degenerate YCbCr subsampling factors.Sebastian Rasmussen
2017-05-31Avoid double literals causing casts to float.Sebastian Rasmussen
2017-05-29Tweak JPEG2000 colorspace detection.Tor Andersson
2017-05-29Make PI/RADIAN/SQRT2/LN2 global single precision float constants.Sebastian Rasmussen
2017-05-27Bug 697947: Handle Illegal hex codes in PDF names.Sebastian Rasmussen
PDF 1.2 and prior treats # in PDF names to be regular characters. PDF 1.2 and later treats # as escape characters for character hex codes. Previously illegal hex codes, e.g. #BX, were partially parsed as escaped hex codes and the illegal remainder parsed as regular characters. Now illegal hex codes are handled as consisting entirely of regular characters. Note that character code 0 is also considered to be an illegal hex code.
2017-05-27Handle extremely long PDF names.Sebastian Rasmussen
Previously the parser would cut these names short and then parse the remainder as a separate name.
2017-05-25Update Type 3 font bbox with glyph bboxes if the former is invalid.Tor Andersson
Fix for bug 697943. Set the initial replacement font bbox to the empty rectangle for type3 fonts, and let the type3 glyph loading initialize by taking the union of all glyph bboxes. Set the replacement font bbox for non-Type3 fonts to the unit rectangle. Also remove unused flag from fz_font struct.
2017-05-25Replace broken FZ_IGNORE_IMAGE hints with other mechanisms.Tor Andersson
Add an option to the structured text device to preserve images. If the PDF processor does not have ops to process images, then skip loading them in the interpreter if possible. If the device does not have any image callbacks, then don't set the image processing ops in the run device. This accomplishes the same effect as the device hints were intended to do, but without needing to expose them to the PDF interpreter which may not even have a device since we now have multiple PDF op processors.
2017-05-23Remove unused strtod function.Tor Andersson
2017-05-23svg: Allow missing optional commas in transform attribute.Tor Andersson
2017-05-23Handle 'auto' property in css numbers. Support block box 'width' property.Tor Andersson
For now, treat auto in margins as zero.
2017-05-19Fall back to encoding the glyph index as ASCII in Type3 fonts.Tor Andersson
2017-05-19Fix 697898: Typo in iterator in JS Page.getLinks().Tor Andersson
2017-05-09Fix plotter bug.Robin Watts
We were passing in the wrong source alpha value in one of the plotter calls. This is not a call used in our standard builds, hence us not having seen the problem before. Credit to Sebastian for spotting the problem and suggesting the fix.
2017-05-09Fix incorrect sa value passed in a plotter.Robin Watts
Should be 0..256 not 0..1
2017-05-09Fix leak of dictionary in CMAP.Robin Watts
2017-05-09Fix Memento 'history' of block actions.Robin Watts
We call Memento_takeRef etc throughout the code so that each block keeps a history of the events on which it's reference count changes. I'd missed a case - fixed here.
2017-05-09Fix key_storable operations leading to leaks of fz_image.Robin Watts
key_storable objects can either be freed 'directly' by an API call (such as fz_drop_image), or 'internally' by the store realising that the sole thing holding onto a key_storable is a key. The current code frees more structure in the direct call than it does in the internal call. Clearly this is wrong and leads to leaks. The fix is to do ALL the freeing in the internal 'drop' function within the key_storable. This means we don't need (or want) either fz_drop_key_storable_key or fz_drop_key_storable to return an int to tell us whether they were actually dropped, so we make that change to simplify the code. This shifts the responsibility for freeing the extra internal structure into the innermost drop functions - fz_drop_image_imp and fz_drop_image_gprf_imp. To avoid duplicating code, we put the extra freeing logic into a fz_drop_image_base function.
2017-05-08tiff: Fix bug where both tiff and fax decoders inverted the image.Sebastian Rasmussen
2017-05-08Bug 697864: Free temporary pixmaps only if created.Sebastian Rasmussen
Previously this caused memory checker errors due to a non-temporary pixmap being accidentally freed and then later reused as expected.
2017-05-08js: Propagate errors from JS devices to fitz.Tor Andersson
2017-05-04Drop FZ_PATH_MAX macro.Tor Andersson
Define PATH_MAX in the few files that use it, should it be missing.
2017-05-03Fix windows builds: windows doesn't have sys/time.hRobin Watts
A nicer fix wouldn't require this #ifdeffery everywhere. Maybe later.
2017-05-03Fix windows builds: No S_ISDIR macro.Robin Watts
2017-05-02tiff: Fix typo in validation of tiles images.Sebastian Rasmussen
2017-05-02tiff: Scale Lab components to suit colorspace.Sebastian Rasmussen
TIFF already provides the a/b components prescaled. Previously the colorspace color conversion process scaled them again, causing out of range behaviour.
2017-04-30tiff: Set k>0 for CCITT fax group 3 1D/2D compression.Sebastian Rasmussen
Previously, if a TIFF file was encoded using CCITT fax group 3 compression and mixing 1D and 2D codes, the fax decoder was not instructed to parse the 1D/2D indication bit after EOL. This caused later issues when parsing the succeeding 1D/2D code, e.g. resulting in the decoder encountering a negative 1D code and returning with an error. Setting k>0 means the 1D/2D indication bit is parsed. The CCITT fax group 3 specification recommends setting k based on the vertical resolution. MuPDF's fax decoder depends only on if k is <0, 0 or >0, not its value (as recommended by the PDF specification). Therefore it is not necessary to use the vertical resolution to determine a particular value for k.
2017-04-28Add support for manipulating PDF annotation vertices.Sebastian Rasmussen
2017-04-27Break line at public identifiers, making them easily grepable.Sebastian Rasmussen