static void read_scale_img(image * a) { image_dict *ad; if (a == NULL) { luaL_error(Luas, "the image scaler needs a valid image"); } else { ad = img_dict(a); if (a == NULL) { luaL_error(Luas, "the image scaler needs a valid dictionary"); } else { if (img_state(ad) == DICT_NEW) { if (img_type(ad) == IMG_TYPE_PDFSTREAM) check_pdfstream_dict(ad); else { read_img(ad); } } if ((img_type(ad) == IMG_TYPE_NONE) || (img_state(ad) == DICT_NEW)) { normal_warning("image","don't rely on the image data to be okay"); img_width(a) = 0; img_height(a) = 0; img_depth(a) = 0; } else if (is_wd_running(a) || is_ht_running(a) || is_dp_running(a)) { img_dimen(a) = scale_img(ad, img_dimen(a), img_transform(a)); } } } }
static void read_scale_img(image * a) { image_dict *ad; assert(a != NULL); ad = img_dict(a); assert(ad != NULL); if (img_state(ad) == DICT_NEW) { if (img_type(ad) == IMG_TYPE_PDFSTREAM) check_pdfstream_dict(ad); else { fix_pdf_minorversion(static_pdf); read_img(static_pdf, ad, pdf_minor_version, pdf_inclusion_errorlevel); } } if (is_wd_running(a) || is_ht_running(a) || is_dp_running(a)) img_dimen(a) = scale_img(ad, img_dimen(a), img_transform(a)); }