summaryrefslogtreecommitdiff
path: root/amiga/bitmap.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2015-06-22 19:12:57 +0100
committerChris Young <chris@unsatisfactorysoftware.co.uk>2015-06-22 19:12:57 +0100
commit354de433e9b9599a46952cbddfb0e53f1e9f37e6 (patch)
tree3c761815b38fc4cb9f7da17d127235d6c3f984b6 /amiga/bitmap.c
parent73d6b47e6a4152cd0fe7dd6b9651701ef2a47609 (diff)
downloadnetsurf-354de433e9b9599a46952cbddfb0e53f1e9f37e6.tar.gz
netsurf-354de433e9b9599a46952cbddfb0e53f1e9f37e6.tar.bz2
Scale cached favicons before they are cached. This avoids the need to scale icons on menu creation.
Diffstat (limited to 'amiga/bitmap.c')
-rw-r--r--amiga/bitmap.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index bdb6abc63..23f3a45e7 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -123,6 +123,14 @@ bool amiga_bitmap_save(void *bitmap, const char *path, unsigned flags)
if((dto = ami_datatype_object_from_bitmap(bitmap)))
{
+ if (flags & AMI_BITMAP_SCALE_ICON) {
+ IDoMethod(dto, PDTM_SCALE, 16, 16, 0);
+
+ if((DoDTMethod(dto, 0, 0, DTM_PROCLAYOUT, 0, 1)) == 0) {
+ return false;
+ }
+ }
+
err = SaveDTObjectA(dto, NULL, NULL, path, DTWM_IFF, FALSE, NULL);
DisposeDTObject(dto);
}