summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-09-28Bug 697166: tiff: Avoid freeing offset/bytecount arrays twice.Sebastian Rasmussen
2016-09-28Bug 697165: tiff: Do not allow duplicate array tags.Sebastian Rasmussen
Previously this caused a memory leak.
2016-09-28Bug 697155: tiff: Drop stream if compression is unknown.Sebastian Rasmussen
m5-299787ea764c0a88bc481364eded5556.tif
2016-09-28Bug 697157: tiff: Rational tag denominators may not be zero.Sebastian Rasmussen
2016-09-28Bug 697156: tiff: Free tile arrays after use.Sebastian Rasmussen
2016-09-28Bug 697154: tiff: Detect error when decoding strip/tile data.Sebastian Rasmussen
2016-09-27Bug 697153: tiff: Image dimensions must always be bigger than 0.Sebastian Rasmussen
2016-09-27Bug 697152: jpeg: Use correct macro to get client data.Sebastian Rasmussen
In commit 6a8abce9603f69b57e407f0df4044be919f507d7 an agnostic memory handler was introduced for libjpeg. While this commit changed error_exit_dct() it forgot to make a similar change in error_exit().
2016-09-27Bug 697163: gif: Fix integer overflow in image dimensions.Sebastian Rasmussen
2016-09-27Bug 697162: gif: Color index must be inside color table.Sebastian Rasmussen
2016-09-27Bug 697161: gif: Frames may not be bigger than the image.Sebastian Rasmussen
2016-09-27Bug 697160: gif: Transparency index must be inside color table.Sebastian Rasmussen
2016-09-26Update OpenJPEG to the latest (git) version.Robin Watts
Part of the change in this code is to require opj_malloc and co. Sadly, opj_malloc and co do not take a context field, so a we need to wrap calls to openjpeg with a lock. I am reusing the freetype lock here for simplicity.
2016-09-27tiff: Fix typo in thunder decoder.Sebastian Rasmussen
2016-09-27Add newly added files missing from VS project.Sebastian Rasmussen
2016-09-26tiff: Support tiled images.Sebastian Rasmussen
2016-09-26tiff: Estimate uncompressed strip sizes if missing.Sebastian Rasmussen
2016-09-26tiff: Reorganize code, preparing for tiled image support.Sebastian Rasmussen
2016-09-26tiff: Add support for thunder decoding.Sebastian Rasmussen
2016-09-26tiff: Support flate compression under differnent name.Sebastian Rasmussen
2016-09-26tiff: Support images with 2 and 16 bits per palette color.Sebastian Rasmussen
2016-09-26tiff: Support images using Lab colorspace.Sebastian Rasmussen
2016-09-26gif: If decompression fails, don't rely on uninitialized buffer data.Sebastian Rasmussen
2016-09-26gif: Use frame size when parsing a frame, not size of entire image.Sebastian Rasmussen
2016-09-26pnm: Interpret b/w image colors correctly.Sebastian Rasmussen
2016-09-26Fix memory leak when opening html/loading raw stream.Sebastian Rasmussen
2016-09-26Make git ignore optional thirdparty libraries.Sebastian Rasmussen
2016-09-23JNI: Improve string/name encoding handling.Robin Watts
At the moment, when we create java Strings from string or name PDFObjects, we assume they are all in javas not-quite-UTF-but-almost encoding. Here we assume they are in standard PDF format (namely that if they do not start with one of 2 specific BOMs, that they are in PDFDocEncoding). We update the code to convert to unicode, and create strings from that. This has the added side effect of correctly coping with 0 bytes in the middle of string buffers.
2016-09-23GProof: Fix typos in gs invocationRobin Watts
2016-09-23Android example: Make selected display profile persistentFred Ross-Perry
Also, we attempt to start the proofing at the currently-being-viewed page.
2016-09-23Android example: add embedded profile to print profiles listFred Ross-Perry
In the proof dialog, when the document has an embedded print profile, add it to the top of the list of choices. If it's selected, send <EMBEDDED> into gs instead of a file name.
2016-09-23Android example: tweak Apply button in proofing dialog.Fred Ross-Perry
Enable Apply button in proofing only when color checkboxes are changed.
2016-09-23Android example: move kankan module.Fred Ross-Perry
Out of platform/java and into the platform/android/example.
2016-09-23Fix leak in error case of pdf_add_stream.Robin Watts
2016-09-23JNI: Fix typo in logic.Robin Watts
2016-09-23JNI: Rework conversion functions and nulls.Robin Watts
Java has a convention that 'toString' should return a printable version of an object. We cannot both support this, and support a sane naming of functions to interpret pdf objects that begins with 'to'. Instead use 'as'. This means we have 'asBoolean', 'asInteger', 'asString' which expect to work just on pdf objects of the required type. 'toString' continues to work on all types and gives a printable version. We split 'toByteString' into 2 separate functions, one for acting on strings (asByteString) and one for acting on names (asByteName) more nicely mirroring the C level functions (pdf_to_string and pdf_to_name). For simplicity of use, we add asString and asName functions that return using java Strings rather than byte arrays. There are potential encoding issues with these, but then there are throughout our string handling at the moment, so we will deal with those in a followup commit. We also update the internal workings of several functions so that they never return NULL pointers, but rather return the null object. To avoid repeatedly creating new null objects we introduce a global static PDFObject.Null object. This is important as we want get("SomethingNonexistent") to return a valid java object, so we can safely do things like: get("Foo").get("Bar").get("Baz").asInteger() without having to error check at every stage. Update DocViewActivity to call the new versions.
2016-09-23Java code to get embedded profile name from a PDF.Robin Watts
To be used to make correct profile invocations.
2016-09-23Clean up annotation enum names.Tor Andersson
Put them in the PDF name space and separate words with underscores. Remove redundant namespace prefixes in java constants. Device.FLAG_MASK rather than Device.FZ_DEVFLAG_MASK. Use namespace for PDF annotation flag enum.
2016-09-23Check for buffer overflow in strtod ascii division.Tor Andersson
2016-09-23Fix warning: set but unused variable.Tor Andersson
2016-09-23Add 'make android' target to build android viewer.Tor Andersson
2016-09-23Update MuJS.Tor Andersson
2016-09-22GPROOF: Modify gs invocation.Michael Vrhel
If we get the print profile given as '<EMBEDDED>' then use the print profile (Output Intent) embedded in the file. If not, we continue to use the defaults if given the empty string, or the given file otherwise.
2016-09-23Bug 697021: Count used string space correctly.Sebastian Rasmussen
Account for used space before comparison, not after.
2016-09-23Bug 697020: Remove variable only ever written to.Sebastian Rasmussen
2016-09-22Include Java files when creating source tags.Sebastian Rasmussen
2016-09-22tools: Prefer fz_atof() to atof().Sebastian Rasmussen
2016-09-22GProof: When invoking gs, redirect gs stdio to local stderr.Robin Watts
For android this means it will go to our logging. This moves the code out of gs.
2016-09-22Bug 697015: Avoid object references vanishing during repair.Robin Watts
A PDF repair can be triggered 'just in time', when we encounter a problem in the file. The idea is that this can happen without the enclosing code being aware of it. Thus the enclosing code may be holding 'borrowed' references (such as those returned by pdf_dict_get()) at the time when the repair is triggered. We are therefore at pains to ensure that the repair does not replace any objects that exist already, so that the calling code will not have these references unexpectedly invalidated. The sole exception to this is when we replace the 'Length' fields in stream dictionaries with the actual lengths. Bug 697015 shows exactly this situation causing a reference to become invalid. The solution implemented here is to add an 'orphan list' to the document, where we put these (hopefully few, small) objects. These orphans are kept around until the document is closed.
2016-09-22Bug 697018: Avoid recursing infinitely on dicts in mutool info.Sebastian Rasmussen