mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-27 03:44:23 +03:00
[project @ 2004-06-24 16:54:28 by jmb]
Update content->size to more accurate value. svn path=/import/netsurf/; revision=1002
This commit is contained in:
parent
913498394c
commit
86e56dc173
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user