Lines Matching refs:image_info
30 static void _mupdf_init(wprint_image_info_t *image_info) { in _mupdf_init() argument
41 static status_t _mupdf_get_hdr(wprint_image_info_t *image_info) { in _mupdf_get_hdr() argument
51 pages = pdf_render->openDocument(pdf_render, image_info->decoder_data.urlPath); in _mupdf_get_hdr()
54 result = pdf_render->getPageAttributes(pdf_render, image_info->decoder_data.page, &pageWidth, in _mupdf_get_hdr()
59 zoom = (image_info->pdf_render_resolution) / POINTS_PER_INCH; in _mupdf_get_hdr()
64 image_info->width = imageWidth; in _mupdf_get_hdr()
65 image_info->height = imageHeight; in _mupdf_get_hdr()
72 LOGI("Render page=%d w=%.0f h=%.0f res=%d zoom=%0.2f size=%d", image_info->decoder_data.page, in _mupdf_get_hdr()
73 pageWidth, pageHeight, image_info->pdf_render_resolution, zoom, size); in _mupdf_get_hdr()
77 result = pdf_render->renderPageStripe(pdf_render, image_info->decoder_data.page, imageWidth, in _mupdf_get_hdr()
86 image_info->decoder_data.pdf_info.fz_pixmap_ptr = rawBuffer; in _mupdf_get_hdr()
87 image_info->decoder_data.pdf_info.bitmap_ptr = malloc( in _mupdf_get_hdr()
88 image_info->width * RGB_NUMBER_PIXELS_NUM_COMPONENTS); in _mupdf_get_hdr()
89 image_info->num_components = RGB_NUMBER_PIXELS_NUM_COMPONENTS; in _mupdf_get_hdr()
94 static unsigned char *_mupdf_decode_row(wprint_image_info_t *image_info, int row) { in _mupdf_decode_row() argument
97 if (image_info->swath_start == -1) { in _mupdf_decode_row()
98 wprint_image_compute_rows_to_cache(image_info); in _mupdf_decode_row()
101 image_info->swath_start = row; in _mupdf_decode_row()
102 if (NULL != image_info->decoder_data.pdf_info.fz_pixmap_ptr) { in _mupdf_decode_row()
103 rgbPixels = (unsigned char *) image_info->decoder_data.pdf_info.bitmap_ptr; in _mupdf_decode_row()
104 memcpy(rgbPixels, (char *) (image_info->decoder_data.pdf_info.fz_pixmap_ptr) + in _mupdf_decode_row()
105 row * image_info->width * RGB_NUMBER_PIXELS_NUM_COMPONENTS, in _mupdf_decode_row()
106 image_info->width * RGB_NUMBER_PIXELS_NUM_COMPONENTS); in _mupdf_decode_row()
111 static status_t _mupdf_cleanup(wprint_image_info_t *image_info) { in _mupdf_cleanup() argument
113 if (NULL != image_info->decoder_data.pdf_info.fz_pixmap_ptr) { in _mupdf_cleanup()
114 free(image_info->decoder_data.pdf_info.fz_pixmap_ptr); in _mupdf_cleanup()
115 image_info->decoder_data.pdf_info.fz_pixmap_ptr = NULL; in _mupdf_cleanup()
117 if (image_info->decoder_data.pdf_info.bitmap_ptr != NULL) { in _mupdf_cleanup()
118 free(image_info->decoder_data.pdf_info.bitmap_ptr); in _mupdf_cleanup()
125 static status_t _mupdf_supports_subsampling(wprint_image_info_t *image_info) { in _mupdf_supports_subsampling() argument
130 static int _mupdf_native_units(wprint_image_info_t *image_info) { in _mupdf_native_units() argument
131 return image_info->pdf_render_resolution; in _mupdf_native_units()