diff options
Diffstat (limited to 'apps/gui')
-rw-r--r-- | apps/gui/icon.c | 5 | ||||
-rw-r--r-- | apps/gui/skin_engine/skin_parser.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c index 4c006f947a..d24d8bb677 100644 --- a/apps/gui/icon.c +++ b/apps/gui/icon.c | |||
@@ -189,7 +189,7 @@ static void load_icons(const char* filename, enum Iconset iconset, | |||
189 | enum screen_type screen) | 189 | enum screen_type screen) |
190 | { | 190 | { |
191 | int size_read; | 191 | int size_read; |
192 | int bmpformat = (FORMAT_NATIVE|FORMAT_DITHER); | 192 | int bmpformat = (FORMAT_NATIVE|FORMAT_DITHER|FORMAT_TRANSPARENT); |
193 | struct iconset *ic = &iconsets[iconset][screen]; | 193 | struct iconset *ic = &iconsets[iconset][screen]; |
194 | int fd; | 194 | int fd; |
195 | 195 | ||
@@ -217,6 +217,9 @@ static void load_icons(const char* filename, enum Iconset iconset, | |||
217 | size_read = read_bmp_fd(fd, &ic->bmp, buf_size, bmpformat, NULL); | 217 | size_read = read_bmp_fd(fd, &ic->bmp, buf_size, bmpformat, NULL); |
218 | ic->handle_locked = 0; | 218 | ic->handle_locked = 0; |
219 | 219 | ||
220 | /* free unused alpha channel, if any */ | ||
221 | core_shrink(ic->handle, ic->bmp.data, size_read); | ||
222 | |||
220 | if (size_read <= 0) | 223 | if (size_read <= 0) |
221 | ic->handle = core_free(ic->handle); | 224 | ic->handle = core_free(ic->handle); |
222 | else | 225 | else |
diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index d207a1fb3e..8eef1dedee 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c | |||
@@ -1577,6 +1577,8 @@ static int load_skin_bmp(struct wps_data *wps_data, struct bitmap *bitmap, char* | |||
1577 | close(fd); | 1577 | close(fd); |
1578 | if (ret > 0) | 1578 | if (ret > 0) |
1579 | { | 1579 | { |
1580 | /* free unused alpha channel, if any */ | ||
1581 | core_shrink(handle, core_get_data(handle), ret); | ||
1580 | return handle; | 1582 | return handle; |
1581 | } | 1583 | } |
1582 | else | 1584 | else |