diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-06-24 16:54:28 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-06-24 16:54:28 +0000 |
commit | 86e56dc173b4d7a539ef7c87005dcd5276b336a7 (patch) | |
tree | a8e8ac46e1989436998765c4b2fafbc89927420c | |
parent | 913498394ccac510785e8835ee951e1f46a2c099 (diff) | |
download | netsurf-86e56dc173b4d7a539ef7c87005dcd5276b336a7.tar.gz netsurf-86e56dc173b4d7a539ef7c87005dcd5276b336a7.tar.bz2 |
[project @ 2004-06-24 16:54:28 by jmb]
Update content->size to more accurate value.
svn path=/import/netsurf/; revision=1002
-rw-r--r-- | riscos/gif.c | 3 | ||||
-rw-r--r-- | riscos/jpeg.c | 1 | ||||
-rw-r--r-- | riscos/png.c | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/riscos/gif.c b/riscos/gif.c index b295bc31d..f23c08d81 100644 --- a/riscos/gif.c +++ b/riscos/gif.c @@ -72,7 +72,7 @@ bool nsgif_convert(struct content *c, int iwidth, int iheight) { */ res = gif_initialise(gif); switch (res) { - case GIF_INSUFFICIENT_MEMORY: + case GIF_INSUFFICIENT_MEMORY: msg_data.error = messages_get("NoMemory"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); warn_user("NoMemory", 0); @@ -101,6 +101,7 @@ bool nsgif_convert(struct content *c, int iwidth, int iheight) { if (c->title) { snprintf(c->title, 100, messages_get("GIFTitle"), c->width, c->height, c->source_size); } + c->size += (gif->width * gif->height * 4) + 16 + 44 + 100; /* Initialise the first frame so if we try to use the image data directly prior to a plot we get some sensible data diff --git a/riscos/jpeg.c b/riscos/jpeg.c index ea8cb120b..9cbcd68f9 100644 --- a/riscos/jpeg.c +++ b/riscos/jpeg.c @@ -157,6 +157,7 @@ bool nsjpeg_convert(struct content *c, int w, int h) if (c->title) snprintf(c->title, 100, messages_get("JPEGTitle"), width, height, c->source_size); + c->size += area_size + 100; c->status = CONTENT_STATUS_DONE; return true; } diff --git a/riscos/png.c b/riscos/png.c index 440a17f34..1cc2bf622 100644 --- a/riscos/png.c +++ b/riscos/png.c @@ -253,6 +253,7 @@ bool nspng_convert(struct content *c, int width, int height) if (c->title) snprintf(c->title, 100, messages_get("PNGTitle"), c->width, c->height, c->source_size); + c->size += (c->width * c->height * 4) + 16 + 44 + 100; c->status = CONTENT_STATUS_DONE; return true; } |