summaryrefslogtreecommitdiff
path: root/pdf/pdf_image.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-12-15 00:43:54 +0000
committerRobin Watts <robin.watts@artifex.com>2011-12-15 00:43:54 +0000
commitba4cca2c65677aeffb088117169abbc12ebec3fc (patch)
tree08379a140cd14f2164114d43a722fabf111a0fff /pdf/pdf_image.c
parent313e8f82816c839b3de47e1137a91414bb95a327 (diff)
downloadmupdf-ba4cca2c65677aeffb088117169abbc12ebec3fc.tar.xz
Remove 'soft limit' on pixmaps in favour of fz_store.
Change the fz_store to be limited to 256 Megs. Remove the soft limit for pixmaps; the store will automatically throw old resources away to stay below the limit.
Diffstat (limited to 'pdf/pdf_image.c')
-rw-r--r--pdf/pdf_image.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pdf/pdf_image.c b/pdf/pdf_image.c
index 4266ded3..ead5c365 100644
--- a/pdf/pdf_image.c
+++ b/pdf/pdf_image.c
@@ -160,8 +160,11 @@ pdf_load_image_imp(pdf_xref *xref, fz_obj *rdb, fz_obj *dict, fz_stream *cstm, i
}
/* Allocate now, to fail early if we run out of memory */
- tile = fz_new_pixmap_with_limit(ctx, colorspace, w, h);
- if (!tile)
+ fz_try(ctx)
+ {
+ tile = fz_new_pixmap(ctx, colorspace, w, h);
+ }
+ fz_catch(ctx)
{
fz_throw(ctx, "out of memory");
}