From 478d953ea50169cab4ae57ba414c57332b17bf5f Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sat, 16 May 2009 14:50:30 +0000 Subject: Copy and save images in IFF ILBM format. Currently, the data in the BODY chunk is wrong. svn path=/trunk/netsurf/; revision=7516 --- amiga/bitmap.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'amiga/bitmap.c') diff --git a/amiga/bitmap.c b/amiga/bitmap.c index 1e553c287..be34e1951 100644 --- a/amiga/bitmap.c +++ b/amiga/bitmap.c @@ -23,6 +23,8 @@ #include #include #include "amiga/options.h" +#include +#include /** * Create a bitmap. @@ -123,6 +125,22 @@ void bitmap_destroy(void *bitmap) bool bitmap_save(void *bitmap, const char *path, unsigned flags) { + struct IFFHandle *iffh; + struct bitmap *bm = bitmap; + + if(iffh = AllocIFF()) + { + if(iffh->iff_Stream = Open(path,MODE_NEWFILE)) + { + InitIFFasDOS(iffh); + ami_easy_clipboard_bitmap(bm,iffh,bm->url,bm->title); + bm->url = NULL; + bm->title = NULL; + Close(iffh->iff_Stream); + } + FreeIFF(iffh); + } + return true; } -- cgit v1.2.3