/* if cmd was \XeTeXpdffile, use xpdflib to read it */
if (pdfBoxType != 0) {
err = pdf_get_rect(pic_path, page, pdfBoxType, bounds);
goto done;
}
/* otherwise try graphics formats that we know */
fp = fopen(pic_path, FOPEN_RBIN_MODE);
if (fp == NULL)
goto done;
if (check_for_jpeg(fp)) {
struct JPEG_info info;
err = JPEG_scan_file(&info, fp);
if (err == 0) {
bounds->wd = (info.width * 72.27) / info.xdpi;
bounds->ht = (info.height * 72.27) / info.ydpi;
}
goto done;