Age | Commit message (Collapse) | Author |
|
|
|
When using -I without -X we were not seeing the expected images
listed. Adopt the solution suggested by the bug reporter.
Many thanks!
|
|
Keep to our naming conventions.
|
|
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.
|
|
|
|
|
|
If an image is a JPEG (without a mask, or a colorkey, or using
decode), then extract it as such.
|
|
This avoids us having to check the entire array each time, and
makes the next commit simpler.
|
|
|
|
When calculating how many repeats of tiles are required, we
need to allow for the fact that the bbox of the tile can be
larger than the repeat step in PDF.
The calculation to do this before was incorrectly being done
using the scissor bbox, when it should have been the tile
bbox.
|
|
|
|
|
|
|
|
Keep them as 'FLOW' entries rather than box entries. Although
they technically enclose areas of text, we only ever use them
as points.
Thanks to Tor for fixing this code.
|
|
Saves 12 bytes per fz_html, and we have a lot.
|
|
Saves 8 bytes on every css_style (and we have a lot of those).
|
|
This relieves all document formats from reimplementing opening a
fz_stream unless the format wants to do something more than just
opening the raw file.
|
|
|
|
|
|
|
|
|
|
Intended as a fix for bug 697123, but the problem turns out to
be something else entirely. Nonetheless, this is worth having.
|
|
Slightly revised blending, making use of the fact that we can
no longer overflow due to ma + masa <= 0x100.
|
|
|
|
As part of the blending calculations, we do:
dst = src * mask_alpha + dst * (1-mask_alpha.src_alpha)
We calculate mask_alpha as ma, and 1-mask_alpha.src_alpha as masa.
In full accuracy, we should never have ma + masa >= 1.
Unfortunately, with the formulation used in the painters at the
moment, we can. We therefore rejig the calculations slightly.
|
|
Used for the file from bug 697122. Makes a small improvement
overall. (31.3s to 31s for a cutdown file).
The equivalent code using 64bit operations is slower.
|
|
|
|
If we have a source alpha, and it's 0, then nothing to paint.
|
|
|
|
Better name as not all shadings are meshes.
|
|
|
|
|
|
New Devanagari serif font, several other updated fonts.
|
|
New in PDF 2.0.
|
|
The stream loading is used only by the JS code loading.
|
|
|
|
|
|
|
|
Use a flag in the pdf_annot struct instead.
Don't pass pdf_document to annotation edit functions.
|
|
Add isPDF methods to query availability of PDF specific methods.
|
|
font->name can never be NULL as it is an array.
|
|
The implementation does not need to be in the public API.
|
|
If we fail to open a CBZ page, we were dropping the CBZ
specific part, but not the fz_page part.
|
|
Otherwise we were tripping over the lack of the header file.
|
|
|
|
The spec says entries should be 20 bytes long. In practise we
see 19 byte long ones more often than we like. This is due to
the use of a single EOL char rather than 2.
The PCLm files I've seen use 19 byte ones, so update the code
to cope with these.
|
|
|
|
Only create a text object if we are definitely going to use it,
and then take care of exceptions being thrown.
|
|
Thanks to Vlad Glagolev for the example file, analysis and
patch.
We had failed to initialise the "last break class" value, so that
when we use it as an index into an array, we run the risk of
crashing.
The fix is simply to initialise it. By initialising it to OP
we don't allow any softbreaks to be added when it's uninitialised,
which feels right to me.
|
|
|