summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--riscos/gif.c3
-rw-r--r--riscos/jpeg.c1
-rw-r--r--riscos/png.c1
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;
}