Age | Commit message (Collapse) | Author |
|
Allow mutool convert to output all image formats we can write.
Add sanity checks for pbm and pkm writers.
|
|
Rename fz_write to fz_write_data.
Rename fz_write_buffer_* and fz_buffer_printf to fz_append_*.
Be consistent in naming:
fz_write_* calls write to fz_output.
fz_append_* calls append to fz_buffer.
Update documentation.
|
|
Remove needless parameter passing in fz_band_writer API.
We always know the bandstart, so why make the caller keep track
of it and pass it in?
Similarly, we know when we hit the end of the page, so why
require us to trigger the trailer writing manually?
|
|
Better to have this defined at the system level
rather than scattered about in various files.
|
|
In commit 80308eae9964e71b66a18f3de6ebcd2ebf0d306b ("Regularize
band writer interface"), I inadvertently slowed down outputting
to /dev/null. Fixed here.
Also take the opportunity to speed ppm/pnm files writing in
general if we don't need to collate.
|
|
This moves dropping the converted pixmap into fz_convert_pixmap(),
which relieves every caller from doing so. Moreover resolution,
position and interpolation are kept.
|
|
This function calls png_from_pixmap, an auxiliary function to do
the work. This was done deliberately to allow us to make the
optimisation of dropping the pixmap early if it is not required.
This keeps the memory use down in the case when a color conversion
is required.
Sadly, I never appear to have made the trivial change to actually
use it in this mode. Do that now.
|
|
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.
|
|
|
|
|
|
Closing a device or writer may throw exceptions, but much of the
foreign language bindings (JNI and JS) depend on drop to never throw
an exception (exceptions in finalizers are bad).
|
|
Allows us to remove the out parameter 'transform' from fz_begin_page.
|
|
Previously the API assumed that all bands had to be the same
height. By moving the multiplication into the caller, we can
lift that assumption.
|
|
|
|
|
|
|
|
|