summaryrefslogtreecommitdiff
path: root/atari/bitmap.c
diff options
context:
space:
mode:
authorOle Loots <ole@monochrom.net>2013-04-16 02:26:37 +0200
committerOle Loots <ole@monochrom.net>2013-04-16 02:26:37 +0200
commit000dddb260653590873b69d525daa42443659c63 (patch)
treefd1fb28f371bf328bb96f01822cd6de9015733e0 /atari/bitmap.c
parenta2f34686bcb3299b574cffda98029b8e6f7b7259 (diff)
downloadnetsurf-000dddb260653590873b69d525daa42443659c63.tar.gz
netsurf-000dddb260653590873b69d525daa42443659c63.tar.bz2
Inherit bitmap opaque settings when resizing images.
Diffstat (limited to 'atari/bitmap.c')
-rwxr-xr-xatari/bitmap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/atari/bitmap.c b/atari/bitmap.c
index 10b5c8cfa..0f27be49e 100755
--- a/atari/bitmap.c
+++ b/atari/bitmap.c
@@ -421,6 +421,7 @@ size_t bitmap_get_bpp(void *bitmap)
bool bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
HermesFormat *fmt, int nw, int nh)
{
+ unsigned int state = 0;
short bpp = bitmap_get_bpp( img );
int stride = bitmap_get_rowstride( img );
int err;
@@ -436,7 +437,10 @@ bool bitmap_resize(struct bitmap *img, HermesHandle hermes_h,
}
/* allocate the mem for resized bitmap */
- img->resized = bitmap_create_ex( nw, nh, bpp, nw*bpp, 0, NULL );
+ if (img->opaque == true) {
+ state |= BITMAP_OPAQUE;
+ }
+ img->resized = bitmap_create_ex( nw, nh, bpp, nw*bpp, state, NULL );
if( img->resized == NULL ) {
printf("W: %d, H: %d, bpp: %d\n", nw, nh, bpp);
assert(img->resized);