summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-05-24Skip alphas for "loaded" JPEGs.Robin Watts
2016-05-24Fix 696796: clamp color values in PDF to valid range.Tor Andersson
2016-05-24Fix issues uncovered by coverity.Tor Andersson
2016-05-24Sprinkle some consts and restricts in plotters.Robin Watts
Try and help C avoid pointer aliasing issues. Some of this may not help at all. None of it should hurt though.
2016-05-24Silence "Variable might be used uninitialised" warning.Robin Watts
2016-05-24Fix ARM code in light of plotter changes.Robin Watts
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-05-24Fix -p password option for MuPDF on Windows.Robin Watts
2016-05-23Bug 696795: Proper fix.Robin Watts
When affine plotting with linear interpolation, we need to perform different calculations for the texture and for the edge of the shape. The edge of the shape needs to be calculated in exactly the same way as for non-linear interpolated shapes. The 'texture' position needs to be offset by 1/2 a texture unit in each direction so that the 'pure' color is given in the middle of the texture cells image, not in the top left corner. To achieve these aims, we actually offset the u/v positions by 1/2 (32768, given the fixed point we are using) and adjust for this in the boundary tests. I have a test file that shows this working, which I will attach to the bug, and add to the regression suite.
2016-05-20murun: Add Buffer#writeBuffer to allow for concatenating buffers.Tor Andersson
2016-05-20murun: Add graftObject to javascript bindings.Tor Andersson
Add some paranoid checks to pdf_graft_object to prevent user errors from crashing mupdf.
2016-05-20html: Add SVG image support.Tor Andersson
2016-05-20Add images based on display lists.Tor Andersson
2016-05-20Fix typo.Robin Watts
2016-05-20Remove voodoo from draw-affine.Robin Watts
We had some code in draw-affine that we didn't really understand. Change this for some code that seems more plausible. The voodoo code was showing up problems with the plotter rework (don't really know why), but the non-voodoo code seems happier.
2016-05-16Fit another mistake in cmyk plotters.Robin Watts
2016-05-13Fix error in CMYK plotters.Robin Watts
2016-05-13Fix potential double free in pdfmerge.Tor Andersson
Remove unnecessary extra indirect object; pdf_add_object returns an indirect reference already, so we don't need to duplicate it.
2016-05-13Add common page range parsing function for tools.Tor Andersson
2016-05-13murun: Add document writer object.Tor Andersson
2016-05-13Reference count fz_device.Tor Andersson
Language bindings sometimes require objects to be reference counted.
2016-05-13Fix double free and memory leak.Tor Andersson
2016-05-13Add pdf write support to mutool convert.Tor Andersson
2016-05-13Add long output option parsing.Tor Andersson
Use comma-separated list of flags and key/value pairs, for example: "linearize,resolution=72,colorspace=gray"
2016-05-13Update script that generates browsable hyperlinked html source.Tor Andersson
2016-05-13Update MuJS.Tor Andersson
2016-05-13Remove fz_lookup_device_colorspace().Sebastian Rasmussen
It is not used by mupdf itself and was added in commit 9915a386ea1dab21c5bbd4a0c8012dd13dbda301 to make it easier for sumatrapdf, but sumatrapdf has stopped using the interface.
2016-05-13Make document handler reference counting thread-safe.Sebastian Rasmussen
2016-05-13Introduce a general output context.Sebastian Rasmussen
This makes it possible to redirect standard out and standard error output streams to output streams of your liking. This means that now you can, in gdb, type: (gdb) call pdf_print_obj(ctx, fz_stdout(ctx), obj, 0) (gdb) call fflush(0) or when dealing with an unresolved indirect reference: (gdb) call pdf_print_obj(ctx, fz_stdout(ctx), pdf_resolve_indirect(ctx, ref), 0) (gdb) call fflush(0)
2016-05-13Makefile: list all source dependencies for cmapdump.Sebastian Rasmussen
2016-05-13Move string compare helper to other string functions.Sebastian Rasmussen
2016-05-12Add variadic versions of fz_throw and fz_warn.Simon Reinhardt
2016-05-12Fix Mudraw timings when using -P (bgprint).Robin Watts
Calculations need to be done differently.
2016-05-12Fix race condition in bgprint.Robin
There was a race condition on bgprint.pagenum that could cause the bgprint worker to close down early, leaving the main thread waiting for notification of its closedown.
2016-05-10Enable ARCH_ARM on ARM platforms.Robin Watts
2016-05-09First implementation of parallel rendering ("bgprint")Robin Watts
Add -P flag to mudraw to do 'parallel' rendering. We shift rendering onto a background thread, so that the main thread can continue interpreting page n+1 while page n is being rendered. To do this, we extract the core of the drawpage routine into 'dodrawpage', and either call it directly (in the normal case) or from a bgprint worker thread (in the parallel case). The threading construction exactly parallels that of the threaded band rendering. We have a semaphore to start the render process, a semaphore to indicate when the process has stopped, and the thread itself. The most complex thing here is the rejigging of the printfs required to ensure that we still get the timings displayed in a sane way.
2016-05-09Bug 696759: Fix pdf image subregion decode.Robin Watts
When decoding < 8 bpp images, we need to allow for the fact that the data is byte aligned at the end of each row by being careful in our calculation of r_skip.
2016-05-06Fix pdf_delete_page_range.Robin Watts
And improve the header file commenting.
2016-05-06Mutool clean: Fix sanitisation of pages with Content arrays.Robin Watts
If the Contents of a page are an array, we were forgetting to write the new singleton replacement into the dictionary.
2016-05-06Mutool clean: Copy OCProperties when subsetting.Robin Watts
Otherwise files (such as bug696754.pdf) can go wrong.
2016-05-04Update mupdf-curl to cope with https.Robin Watts
Spot https and pass to curl. If curl isn't built with https support we'll fail, but then we'd fail anyway without trying.
2016-05-04Make minimum line thickness dependent on AA level.Robin Watts
The PDF spec says that line thickness of 0 should mean "1 device pixel". We have been doing some dodgy logic where if the line thickness as scaled by the ctm is small (< 0.1f), make it at least 1 device pixel. This can mean that a line can not qualify for being thickened at 36dpi, but can be thickened at 24dpi. The thickened line at 24dpi is much thicker than the unthickened line at 36dpi, meaning that we get a noticable shift in rendering. Why do we do this strange logic? Well, presumably it's to avoid thin lines dropping out completely. We therefore move to some new logic. Firstly, we create a fudged 'aa_level' value, dependent on the antialias level. With AA level 0 (no antialiasing), this corresponds to 1 device pixel. For maximum AA level (8), this corresponds to 1/5 of a device pixel. Thus we should get 'continuous' results across different dpis.
2016-05-04Avoid using unnamed semaphores.Robin Watts
Apparently neither OSX nor iOS support unnnamed semaphores, so steal the gs versions and use them instead.
2016-04-29muclean: Avoid warning when no Outlines present in document.Robin Watts
2016-04-29Improve header documentation.Robin Watts
2016-04-28Fix JPX breakage caused during refactor.Robin Watts
I was using fz_compressed_image when I should have been using fz_pixmap_image.
2016-04-28Add FZ_ERROR_OOM, and make fz_malloc & co call it.Robin Watts
2016-04-28Refactor fz_image code cases.Robin Watts
Split compressed images (images based on a compressed buffer) and pixmap images (images based on a pixmap) out into separate subclasses.
2016-04-28Tweak fz_image in preparation for things to come.Robin Watts
Move from ints to bits where possible.
2016-04-28Introduce tuning context.Robin Watts
For now, just use it for controlling image decoding and image scaling.