+gfxbbox_t BitmapOutputDev::getImageBBox(GfxState*state)
+{
+ gfxbbox_t bbox;
+ double x,y;
+ state->transform(0, 1, &x, &y);
+ bbox.xmin=bbox.xmax = x;
+ bbox.ymin=bbox.ymax = x;
+ state->transform(0, 0, &x, &y);
+ bbox.xmin=min(bbox.xmin,x);
+ bbox.ymin=min(bbox.ymin,y);
+ bbox.xmax=max(bbox.xmin,x);
+ bbox.ymax=max(bbox.ymin,y);
+ state->transform(1, 0, &x, &y);
+ bbox.xmin=min(bbox.xmin,x);
+ bbox.ymin=min(bbox.ymin,y);
+ bbox.xmax=max(bbox.xmin,x);
+ bbox.ymax=max(bbox.ymin,y);
+ state->transform(1, 1, &x, &y);
+ bbox.xmin=min(bbox.xmin,x);
+ bbox.ymin=min(bbox.ymin,y);
+ bbox.xmax=max(bbox.xmin,x);
+ bbox.ymax=max(bbox.ymin,y);
+ return bbox;
+}