Age | Commit message (Collapse) | Author |
|
|
|
Pointer arithmetic for final special case was going wrong.
|
|
|
|
|
|
This moves dropping the converted pixmap into fz_convert_pixmap(),
which relieves every caller from doing so. Moreover resolution,
position and interpolation are kept.
|
|
|
|
As fz_drop_*()/fz_free() all must handle NULL.
|
|
|
|
The implementation does not need to be in the public API.
|
|
Function exists purely for doing valgrind testing of pixmap
definedness.
|
|
The implementation assumed that a variable contained a number of
32-bit words when it actually contained the number of bytes hence
fz_clear_pixmap_with_value() touched memory outside of the samples
array.
|
|
|
|
|
|
|
|
This has knock on effects in the store.
fix
|
|
When blanking pixmaps (or converting pixmap colors), watch out for
integer overflows.
|
|
Use do {} while(--w) rather than while(w--) {} as this safes a
test each time around the loop.
|
|
PAM output was broken in the absence of alpha. Fixed now.
|
|
|
|
Try and help C avoid pointer aliasing issues. Some of this may not
help at all. None of it should hurt though.
|
|
|
|
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.
|
|
Update the core fz_get_pixmap_from_image code to allow fetching
a subarea of a pixmap. We pass in the required subarea, together
with the transformation matrix for the whole image.
On return, we have a pixmap at least as big as was requested,
and the transformation matrix is updated to map the supplied
area to the correct place on the screen.
The draw device is updated to use this as required. Everywhere
else passes NULLs in, and so gets unchanged behaviour.
The standard 'get_pixmap' function has been updated to decode
just the required areas of the bitmaps.
This means that banded rendering of pages will decode just the
image subareas that are required for each band, limiting the
memory use. The downside to this is that each band will redecode
the image again to extract just the section we want.
The image subareas are put into the fz_store in the same way
as full images. Currently image areas in the store are only
matched when they match exactly; subareas are not identified
as being able to use existing images.
|
|
fz_read_int32_be.
|
|
|
|
Both C and ARM versions. ARM version is noticably faster than C
version.
|
|
In the quest for better mutool draw timings, make fz_outputs going
to /dev/null be represented by a NULL pointer.
Spot this in the output routines and just exit.
|
|
|
|
|
|
At the moment we have the output file being opened in several
different places, leading to several different places
having to cope with the '-' handling.
Simplify the code so that files are only opened in 1 place.
|
|
The loop is exclusive, but the clamp check was as if it were inclusive.
|
|
"Defined but not used" and "Set but not used" as seen with
ndk-build.
|
|
Extraneous explicit type casts can mask errors, especially if a
function prototype or return value changes in the future.
|
|
Image objects are immutable and opaque once constructed.
Therefore there is no need for the const keyword.
|
|
Writing individual bytes using fwrite is VERY slow (profile of debug
code shows 93% of runtime is in system fwrite). Fix this by collating
into a buffer and writing (now 2.5%).
|
|
In general, we should use 'const fz_blah' in device calls whenever
the callee should not alter the fz_blah.
Push this through. This shows up various places where we fz_keep
and fz_drop these const things.
I've updated the fz_keep and fz_drops with appropriate casts
to remove the consts. We may need to do the union dance to avoid
the consts for some compilers, but will only do that if required.
I think this is nicer overall, even allowing for the const<->no const
problems.
|
|
|
|
|
|
|
|
Separate naming of functions that save complete files to disk
from functions that write data to streams.
|
|
Use fz_output in debug printing functions.
Use fz_output in pdfshow.
Use fz_output in fz_trace_device instead of stdout.
Use fz_output in pdf-write.c.
Rename fz_new_output_to_filename to fz_new_output_with_path.
Add seek and tell to fz_output.
Remove unused functions like fz_fprintf.
Fix typo in pdf_print_obj.
|
|
Purge several embedded contexts:
Remove embedded context in fz_output.
Remove embedded context in fz_stream.
Remove embedded context in fz_device.
Remove fz_rebind_stream (since it is no longer necessary).
Remove embedded context in svg_device.
Remove embedded context in XML parser.
Add ctx argument to fz_document functions.
Remove embedded context in fz_document.
Remove embedded context in pdf_document.
Remove embedded context in pdf_obj.
Make fz_page independent of fz_document in the interface.
We shouldn't need to pass the document to all functions handling a page.
If a page is tied to the source document, it's redundant; otherwise it's
just pointless.
Fix reference counting oddity in fz_new_image_from_pixmap.
|
|
Rename fz_close to fz_drop_stream.
Rename fz_close_archive to fz_drop_archive.
Rename fz_close_output to fz_drop_output.
Rename fz_free_* to fz_drop_*.
Rename pdf_free_* to pdf_drop_*.
Rename xps_free_* to xps_drop_*.
|
|
win32 supports tinting, but cannot change the color from the default.
|
|
windows settings.
|
|
Image masks don't have a colorspace; check before dereferencing.
|
|
|
|
|
|
fts_09_0919.pdf shows up some silly mistakes in the clip stack handling
and in the handling of 0 sized pixmaps. Simple fixes.
|
|
A gradient fill that doesn't fill the bbox should be see through
(unless background color is set, but we'll worry about that case
when I find an example file that uses it). Arrange for the pixmap
we draw the gradient fill into to be transparent initially.
Also ensure that when we convert to png we preserve transparency.
|