Age | Commit message (Collapse) | Author |
|
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.
|
|
In an earlier commit, I changed some of the band writing functions
to take the band starting offset, rather than the band number. This
was done to accomodate the idea of rendering the page in bands of
different heights.
Sadly, it seems I didn't push this all the way through, and had
different band writing functions still taking the band number.
Fix all the band writing functions to be consistent.
|
|
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.
|
|
|
|
Introduce a 'generic' PCL setting (basically ljet4 with custom
page sizes for now).
Ensure we send explicit sizes before the custom page sizes, and
don't use Ricoh page sizes unless we are allowed to.
|
|
Output uses adaptive compression mode.
|
|
Previously this would overrun buffers in the pathological
case (ABBABBABB...). We now only break from literals to
runs for a run of at least 3 (except at the start).
|
|
Don't bale on the first 'large enough' match.
|
|
Guess paper sizes from bitmap dimensions unless the paper
size has been specified. If unknown, depending on the
properties of the printer, we'll either send a 'custom'
paper size (followed by the page size in decipoints), or
the next size up.
Depending on the capabilities of the printer, we can
optionally send orientation too.
|
|
The PCL monochrome output code was unfinished. This now produces
PCL accepted by ghostpcl for ljet4 and dj500 presets at least.
|
|
|
|
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.
|
|
If FZ_LARGEFILE is defined when building, MuPDF uses 64bit offsets
for files; this allows us to open streams larger than 2Gig.
The downsides to this are that:
* The xref entries are larger.
* All PDF ints are held as 64bit things rather than 32bit things
(to cope with /Prev entries, hint stream offsets etc).
* All file positions are stored as 64bits rather than 32.
The implementation works by detecting FZ_LARGEFILE. Some #ifdeffery
in fitz/system.h sets fz_off_t to either int or int64_t as appropriate,
and sets defines for fz_fopen, fz_fseek, fz_ftell etc as required.
These call the fseeko64 etc functions on linux (and so define
_LARGEFILE64_SOURCE) and the explicit 64bit functions on windows.
|
|
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_*.
|
|
|
|
|