我想使用以下代码将图像设置为MuPDF中注释的背景:
fz_context *ctx = doc->ctx;
const fz_matrix *page_ctm = &annot->page->ctm;
image_document *image_doc = (image_document *)fz_open_document(ctx, "/Users/zidane/Downloads/a.jpg");
fz_image *image = image_doc->image;
fz_matrix local_ctm = *page_ctm;
float w = image->w * DPI / image->xres;
float h = image->h * DPI / image->yres;
fz_pre_scale(&local_ctm, w, h);
fz_pre_translate(&local_ctm, 0, -1);
fz_fill_image(dev, image, &local_ctm, 1);
有人可以告诉我它为什么不起作用吗?