summaryrefslogtreecommitdiff
path: root/fitz/filt_jpxd.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 /fitz/filt_jpxd.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 'fitz/filt_jpxd.c')
-rw-r--r--fitz/filt_jpxd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fitz/filt_jpxd.c b/fitz/filt_jpxd.c
index 64197a08..3075847b 100644
--- a/fitz/filt_jpxd.c
+++ b/fitz/filt_jpxd.c
@@ -111,8 +111,11 @@ fz_load_jpx_image(fz_context *ctx, unsigned char *data, int size, fz_colorspace
}
}
- img = fz_new_pixmap_with_limit(ctx, colorspace, w, h);
- if (!img)
+ fz_try(ctx)
+ {
+ img = fz_new_pixmap(ctx, colorspace, w, h);
+ }
+ fz_catch(ctx)
{
opj_image_destroy(jpx);
fz_throw(ctx, "out of memory");