diff options
author | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-25 18:48:26 +0000 |
---|---|---|
committer | Sven Weidauer <sven.weidauer@gmail.com> | 2011-01-25 18:48:26 +0000 |
commit | 37d15e2204fd54d0938e463436857117eff4e768 (patch) | |
tree | 08180dc7b00b1c53ea3845d1784d9d227da67edc /cocoa/bitmap.m | |
parent | 620fd90fa7739e0a5bc23bca77033da747046c7e (diff) | |
download | netsurf-37d15e2204fd54d0938e463436857117eff4e768.tar.gz netsurf-37d15e2204fd54d0938e463436857117eff4e768.tar.bz2 |
Fixing bitmap functions to return BYTES and not bits per pixel for bitmap_get_bpp
svn path=/trunk/netsurf/; revision=11487
Diffstat (limited to 'cocoa/bitmap.m')
-rw-r--r-- | cocoa/bitmap.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cocoa/bitmap.m b/cocoa/bitmap.m index eb791c46e..eb95c7c10 100644 --- a/cocoa/bitmap.m +++ b/cocoa/bitmap.m @@ -95,7 +95,7 @@ void bitmap_set_opaque(void *bitmap, bool opaque) bool bitmap_test_opaque(void *bitmap) { - NSCParameterAssert( bitmap_get_bpp( bitmap ) == BITS_PER_PIXEL ); + NSCParameterAssert( bitmap_get_bpp( bitmap ) == BYTES_PER_PIXEL ); unsigned char *buf = bitmap_get_buffer( bitmap ); @@ -133,7 +133,7 @@ size_t bitmap_get_bpp(void *bitmap) { NSCParameterAssert( NULL != bitmap ); NSBitmapImageRep *bmp = (NSBitmapImageRep *)bitmap; - return [bmp bitsPerPixel]; + return [bmp bitsPerPixel] / 8; } bool bitmap_save(void *bitmap, const char *path, unsigned flags) |