Commit ea8a0ad7 authored by Sebastian Ramacher's avatar Sebastian Ramacher

Store height and width

parent 782ef564
......@@ -109,8 +109,10 @@ pdf_page_image_get_cairo(zathura_page_t* page, void* data,
unsigned char* s = fz_pixmap_samples(mupdf_page->ctx, pixmap);
unsigned int n = fz_pixmap_components(mupdf_page->ctx, pixmap);
for (int y = 0; y < fz_pixmap_height(mupdf_page->ctx, pixmap); y++) {
for (int x = 0; x < fz_pixmap_width(mupdf_page->ctx, pixmap); x++) {
const int height = fz_pixmap_height(mupdf_page->ctx, pixmap);
const int width = fz_pixmap_width(mupdf_page->ctx, pixmap);
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++) {
guchar* p = surface_data + y * rowstride + x * 4;
// RGB
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment