summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/output-pwg.c92
-rw-r--r--source/fitz/pixmap.c4
2 files changed, 48 insertions, 48 deletions
diff --git a/source/fitz/output-pwg.c b/source/fitz/output-pwg.c
index 982f8bec..9302009e 100644
--- a/source/fitz/output-pwg.c
+++ b/source/fitz/output-pwg.c
@@ -21,66 +21,66 @@ fz_write_pwg_page_header(fz_context *ctx, fz_output *out, const fz_pwg_options *
fz_write(ctx, out, pwg ? pwg->media_color : zero, 64);
fz_write(ctx, out, pwg ? pwg->media_type : zero, 64);
fz_write(ctx, out, pwg ? pwg->output_type : zero, 64);
- fz_write_int32be(ctx, out, pwg ? pwg->advance_distance : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->advance_media : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->collate : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->cut_media : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->duplex : 0);
- fz_write_int32be(ctx, out, xres);
- fz_write_int32be(ctx, out, yres);
+ fz_write_int32_be(ctx, out, pwg ? pwg->advance_distance : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->advance_media : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->collate : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->cut_media : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->duplex : 0);
+ fz_write_int32_be(ctx, out, xres);
+ fz_write_int32_be(ctx, out, yres);
/* CUPS format says that 284->300 are supposed to be the bbox of the
* page in points. PWG says 'Reserved'. */
for (i=284; i < 300; i += 4)
fz_write(ctx, out, zero, 4);
- fz_write_int32be(ctx, out, pwg ? pwg->insert_sheet : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->jog : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->leading_edge : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->insert_sheet : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->jog : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->leading_edge : 0);
/* CUPS format says that 312->320 are supposed to be the margins of
* the lower left hand edge of page in points. PWG says 'Reserved'. */
for (i=312; i < 320; i += 4)
fz_write(ctx, out, zero, 4);
- fz_write_int32be(ctx, out, pwg ? pwg->manual_feed : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->media_position : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->media_weight : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->mirror_print : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->negative_print : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->num_copies : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->orientation : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->output_face_up : 0);
- fz_write_int32be(ctx, out, w * 72/ xres); /* Page size in points */
- fz_write_int32be(ctx, out, h * 72/ yres);
- fz_write_int32be(ctx, out, pwg ? pwg->separations : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->tray_switch : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->tumble : 0);
- fz_write_int32be(ctx, out, w); /* Page image in pixels */
- fz_write_int32be(ctx, out, h);
- fz_write_int32be(ctx, out, pwg ? pwg->media_type_num : 0);
- fz_write_int32be(ctx, out, bpp < 8 ? 1 : 8); /* Bits per color */
- fz_write_int32be(ctx, out, bpp); /* Bits per pixel */
- fz_write_int32be(ctx, out, (w * bpp + 7)/8); /* Bytes per line */
- fz_write_int32be(ctx, out, 0); /* Chunky pixels */
+ fz_write_int32_be(ctx, out, pwg ? pwg->manual_feed : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->media_position : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->media_weight : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->mirror_print : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->negative_print : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->num_copies : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->orientation : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->output_face_up : 0);
+ fz_write_int32_be(ctx, out, w * 72/ xres); /* Page size in points */
+ fz_write_int32_be(ctx, out, h * 72/ yres);
+ fz_write_int32_be(ctx, out, pwg ? pwg->separations : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->tray_switch : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->tumble : 0);
+ fz_write_int32_be(ctx, out, w); /* Page image in pixels */
+ fz_write_int32_be(ctx, out, h);
+ fz_write_int32_be(ctx, out, pwg ? pwg->media_type_num : 0);
+ fz_write_int32_be(ctx, out, bpp < 8 ? 1 : 8); /* Bits per color */
+ fz_write_int32_be(ctx, out, bpp); /* Bits per pixel */
+ fz_write_int32_be(ctx, out, (w * bpp + 7)/8); /* Bytes per line */
+ fz_write_int32_be(ctx, out, 0); /* Chunky pixels */
switch (bpp)
{
- case 1: fz_write_int32be(ctx, out, 3); /* Black */ break;
- case 8: fz_write_int32be(ctx, out, 18); /* Sgray */ break;
- case 24: fz_write_int32be(ctx, out, 19); /* Srgb */ break;
- case 32: fz_write_int32be(ctx, out, 6); /* Cmyk */ break;
+ case 1: fz_write_int32_be(ctx, out, 3); /* Black */ break;
+ case 8: fz_write_int32_be(ctx, out, 18); /* Sgray */ break;
+ case 24: fz_write_int32_be(ctx, out, 19); /* Srgb */ break;
+ case 32: fz_write_int32_be(ctx, out, 6); /* Cmyk */ break;
default: fz_throw(ctx, FZ_ERROR_GENERIC, "pixmap bpp must be 1, 8, 24 or 32 to write as pwg");
}
- fz_write_int32be(ctx, out, pwg ? pwg->compression : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->row_count : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->row_feed : 0);
- fz_write_int32be(ctx, out, pwg ? pwg->row_step : 0);
- fz_write_int32be(ctx, out, bpp <= 8 ? 1 : 3); /* Num Colors */
+ fz_write_int32_be(ctx, out, pwg ? pwg->compression : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->row_count : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->row_feed : 0);
+ fz_write_int32_be(ctx, out, pwg ? pwg->row_step : 0);
+ fz_write_int32_be(ctx, out, bpp <= 8 ? 1 : 3); /* Num Colors */
for (i=424; i < 452; i += 4)
fz_write(ctx, out, zero, 4);
- fz_write_int32be(ctx, out, 1); /* TotalPageCount */
- fz_write_int32be(ctx, out, 1); /* CrossFeedTransform */
- fz_write_int32be(ctx, out, 1); /* FeedTransform */
- fz_write_int32be(ctx, out, 0); /* ImageBoxLeft */
- fz_write_int32be(ctx, out, 0); /* ImageBoxTop */
- fz_write_int32be(ctx, out, w); /* ImageBoxRight */
- fz_write_int32be(ctx, out, h); /* ImageBoxBottom */
+ fz_write_int32_be(ctx, out, 1); /* TotalPageCount */
+ fz_write_int32_be(ctx, out, 1); /* CrossFeedTransform */
+ fz_write_int32_be(ctx, out, 1); /* FeedTransform */
+ fz_write_int32_be(ctx, out, 0); /* ImageBoxLeft */
+ fz_write_int32_be(ctx, out, 0); /* ImageBoxTop */
+ fz_write_int32_be(ctx, out, w); /* ImageBoxRight */
+ fz_write_int32_be(ctx, out, h); /* ImageBoxBottom */
for (i=480; i < 1668; i += 4)
fz_write(ctx, out, zero, 4);
fz_write(ctx, out, pwg ? pwg->rendering_intent : zero, 64);
diff --git a/source/fitz/pixmap.c b/source/fitz/pixmap.c
index 6897fe35..88e16d9d 100644
--- a/source/fitz/pixmap.c
+++ b/source/fitz/pixmap.c
@@ -859,13 +859,13 @@ static inline void big32(unsigned char *buf, unsigned int v)
static void putchunk(fz_context *ctx, fz_output *out, char *tag, unsigned char *data, int size)
{
unsigned int sum;
- fz_write_int32be(ctx, out, size);
+ fz_write_int32_be(ctx, out, size);
fz_write(ctx, out, tag, 4);
fz_write(ctx, out, data, size);
sum = crc32(0, NULL, 0);
sum = crc32(sum, (unsigned char*)tag, 4);
sum = crc32(sum, data, size);
- fz_write_int32be(ctx, out, sum);
+ fz_write_int32_be(ctx, out, sum);
}
void