summaryrefslogtreecommitdiff
path: root/source/cbz/mucbz.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/cbz/mucbz.c')
-rw-r--r--source/cbz/mucbz.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/cbz/mucbz.c b/source/cbz/mucbz.c
index e133a3b5..ddf3c553 100644
--- a/source/cbz/mucbz.c
+++ b/source/cbz/mucbz.c
@@ -135,17 +135,18 @@ cbz_count_pages(fz_context *ctx, fz_document *doc_)
return doc->page_count;
}
-static fz_rect *
-cbz_bound_page(fz_context *ctx, fz_page *page_, fz_rect *bbox)
+static fz_rect
+cbz_bound_page(fz_context *ctx, fz_page *page_)
{
cbz_page *page = (cbz_page*)page_;
fz_image *image = page->image;
int xres, yres;
+ fz_rect bbox;
fz_image_resolution(image, &xres, &yres);
- bbox->x0 = bbox->y0 = 0;
- bbox->x1 = image->w * DPI / xres;
- bbox->y1 = image->h * DPI / yres;
+ bbox.x0 = bbox.y0 = 0;
+ bbox.x1 = image->w * DPI / xres;
+ bbox.y1 = image->h * DPI / yres;
return bbox;
}
@@ -153,7 +154,7 @@ static void
cbz_run_page(fz_context *ctx, fz_page *page_, fz_device *dev, const fz_matrix *ctm, fz_cookie *cookie)
{
cbz_page *page = (cbz_page*)page_;
- fz_matrix local_ctm = *ctm;
+ fz_matrix local_ctm;
fz_image *image = page->image;
int xres, yres;
float w, h;
@@ -161,7 +162,7 @@ cbz_run_page(fz_context *ctx, fz_page *page_, fz_device *dev, const fz_matrix *c
fz_image_resolution(image, &xres, &yres);
w = image->w * DPI / xres;
h = image->h * DPI / yres;
- fz_pre_scale(&local_ctm, w, h);
+ local_ctm = fz_pre_scale(*ctm, w, h);
fz_fill_image(ctx, dev, image, &local_ctm, 1, NULL);
}