summaryrefslogtreecommitdiff
path: root/image/ico.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-12-17 23:55:02 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2009-12-17 23:55:02 +0000
commit355799ce0bbb078237dfc1ae9874bbc5342acbc4 (patch)
tree7ca980c01c0d4d1d55a3b7b15418c95c5618afae /image/ico.c
parent4346b2b62b940182575e6612e46234355afa083c (diff)
downloadnetsurf-355799ce0bbb078237dfc1ae9874bbc5342acbc4.tar.gz
netsurf-355799ce0bbb078237dfc1ae9874bbc5342acbc4.tar.bz2
Merge branches/MarkieB/gtkmain to trunk.
svn path=/trunk/netsurf/; revision=9729
Diffstat (limited to 'image/ico.c')
-rw-r--r--image/ico.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/image/ico.c b/image/ico.c
index 5416e612a..e2fce245a 100644
--- a/image/ico.c
+++ b/image/ico.c
@@ -115,6 +115,18 @@ bool nsico_redraw(struct content *c, int x, int y,
background_colour, BITMAPF_NONE);
}
+/** sets the bitmap for an ico according to the dimensions */
+
+bool nsico_set_bitmap_from_size(struct content *c, int width, int height)
+{
+ struct bmp_image *bmp = ico_find(c->data.ico.ico, width, height);
+ if (bmp == NULL)
+ return false;
+ if ((bmp->decoded == false) && (bmp_decode(bmp) != BMP_OK))
+ return false;
+ c->bitmap = bmp->bitmap;
+ return true;
+}
bool nsico_redraw_tiled(struct content *c, int x, int y,
int width, int height,