summaryrefslogtreecommitdiff
path: root/source/fitz
AgeCommit message (Collapse)Author
2016-06-16Drop save_alpha argument from image writing functions.Tor Andersson
2016-06-16Split image output functions into separate files.Tor Andersson
2016-06-15tiff: Add omitted static void return type.Sebastian Rasmussen
Commit 44d65838233baef2c16397847dca3061cde7ec4e accidentally omitted the return type when adding TIFF SGI LUV decoding.
2016-06-14Add TIFF SGI LUV decoding.Robin Watts
2016-06-14Update TIFF LZW decode.Robin Watts
TIFF 5.0 uses a slightly laxer set of rules for TIFF decode. Specifically, when we hit the maximum code, we are not required to send a clear code immediately, but it can overrrun. We don't bother storing codes > 12 bits, because they can never be used. This avoids the need to extend the table.
2016-06-14Fix typos in various parts of the code.Sebastian Rasmussen
2016-06-14Add optional support for Luratech JBIG2 decoder.Sebastian Rasmussen
If thirdparty/luratech is populated then this decoder will be preferred over jbig2dec (even if both are present).
2016-06-14stext: Non-initial glyphs in ligatures must set start/stop.Sebastian Rasmussen
Normal glyphs and inital glyphs in ligatures have their start/stop (p and q) set before determining whether to append to an existing span or insert a space. For non-initial glyphs the start/stop were never set which introduced uninitialized values into the span data structure. Now, all glyphs have their start/stop set and then if it is a non-initial glyph in a ligature the append and space detection is ignored. This means that no values are uninitialized.
2016-06-14bmp: Support arbitrary bit mask widths.Sebastian Rasmussen
2016-06-13Add missing restrict.Robin Watts
Missing qualifier from prototype.
2016-06-08Move to using size_t for all mallocs.Robin Watts
This has knock on effects in the store. fix
2016-06-07Fix subarea image calculationsRobin Watts
Calculations that involved non power of 2 bpps were going wrong.
2016-06-06Bug 696810: Avoid integer overflows.Robin Watts
When blanking pixmaps (or converting pixmap colors), watch out for integer overflows.
2016-06-06Fix broken ARM implementation of scale_row_to_temp3.Robin Watts
I had changed some code to *3 when creating the routine from the 4 bpp variant, but this particular multiplication should still have been *4, as it was looking up in an int table.
2016-06-06Fix problem with FZ_PLOTTER_G only builds.Robin Watts
In C we can't have a label as the only thing in a block.
2016-06-06Change ARM assembler to be compatible with Xcode/clangJoseph Heenan
clang only accepts the unified format - so use the unified syntax everywhere, and add .syntax unified to tell the gnu assembler we're using the unified syntax.
2016-05-31Bug 696813: Fix Lab colorspaces.Robin Watts
Lab colorspaces had been broken due to incorrect clipping of color values introduced in an effort to fix Bug 696796.
2016-05-31Update test device with passthrough option.Robin Watts
Update the test device so it can be used 'wrapping' another device. In particular, it can be used to wrap the display list device so that we can evaluate 'color or not' while building the display list rather than having to rerun the display list afterwards. Also, give improved control over whether we test every pixel of images/shadings.
2016-05-30Fix some "defined but not used" when FZ_PLOTTERS_RGB is 0.Robin Watts
2016-05-30Avoid fz_font pulling harfbuzz in.Robin Watts
We store an hb_font in every font, and currently have fz_drop_font know to call harfbuzz to destroy it. This causes harfbuzz to be included even in builds that never use it. We improve this situation by storing both an hb_font, and a function pointer to destroy it within fz_font. This costs us an extra pointer per fz_font, but solves the problem.
2016-05-30Respect FZ_ENABLE_PDF=0 to allow dropping all PDF specific code in tools.Tor Andersson
2016-05-30Add TOFU_BASE14 option.Robin Watts
2016-05-30Ensure that we can use FZ_PLOTTERS_N instead of FZ_PLOTTERS_RGB.Robin Watts
2016-05-30Add config.h include file.Robin Watts
Introduce FZ_PLOTTER defines to set which defines we required. Add FZ_ENABLE define to set which document handlers are built by default.
2016-05-29Accelerate common n=3 color case.Robin Watts
2016-05-29Tweak plotter code slightly for speed.Robin Watts
Use do {} while(--w) rather than while(w--) {} as this safes a test each time around the loop.
2016-05-29Improve speed of fz_paint_solid_color and friends.Robin Watts
2016-05-29Split draw-paint.c plotters out into separate functions.Robin Watts
Again, mainly so profiling works nicely.
2016-05-27Improve speed of fz_paint_affine_N_near and friends.Robin Watts
For the common cases, avoid the loop.
2016-05-27Rejig draw-affine.c for improved profiling.Robin Watts
Profilers can't identify which of the switch arms we are in for the inlined function calls, so rejig the code so that each of these is a separate function. In theory this code should be faster too, as the function 'lookup' is only done one rather than once per line, but I don't expect this to make a huge difference.
2016-05-27Add facility to track usage of functions.Robin Watts
Use this for plotters so we can see which ones are being used in any given build. Build with -DTRACK_USAGE to enable.
2016-05-27Fix ARM code for bitmap scalingRobin Watts
2016-05-26Bug 696803: Fix pam output.Robin Watts
PAM output was broken in the absence of alpha. Fixed now.
2016-05-26Optimisations in draw-affine for 0 alpha pixels.Robin Watts
2016-05-26Cope better when asked to plot alpha only pixmaps.Robin Watts
Converting a pixmap to an alpha only pixmap means "just keep the alpha". If there IS no alpha, then a solid alpha is assumed.
2016-05-26Avoid unnecessary alphas when decompressing images from streams.Robin Watts
2016-05-26Ensure fz_invert_pixmap can cope with no alpha.Robin Watts
2016-05-26Update bitmap scaler to cope with lack of alpha.Robin Watts
If we have alpha on the input, we preserve it. If we have no alpha on the input, we have to create it in the output if the edges aren't pixel aligned.
2016-05-24Skip alphas for "loaded" JPXs (where possible).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-24Fix plotters; alpha being dropped.Robin Watts
In the absence of the source image having an alpha plane, we were dropping the constant alpha during linear interpolated plotting.
2016-05-24Fix optimisation in fz_paint_affine_N_nearRobin Watts
Only do int to int copying if we have an int to copy from. Also, when copying int to int, copy int32_t to int32_t to make us more future proof.
2016-05-24Skip alphas for "loaded" JPEGs.Robin Watts
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-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-20Add images based on display lists.Tor Andersson
2016-05-20Fix typo.Robin Watts