search for: has_alpha

Displaying 15 results from an estimated 15 matches for "has_alpha".

2007 Feb 06
0
21 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_bits.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c
...bswfdec/swfdec_image.c @@ -657,7 +657,7 @@ swfdec_image_create_surface_transformed for (i = 0; i < n; i++) { ((guint32 *) tdata)[i] = swfdec_color_apply_transform_premultiplied (((guint32 *) sdata)[i], trans); /* optimization: check for alpha channel to speed up compositing */ - has_alpha != tdata[4 * i + SWFDEC_COLOR_INDEX_ALPHA] != 0xFF; + has_alpha = tdata[4 * i + SWFDEC_COLOR_INDEX_ALPHA] != 0xFF; } surface = cairo_image_surface_create_for_data (tdata, has_alpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24, diff-tree f8ad5602edb3223fcc0396a60d6077ad562be7e1 (from...
2007 Feb 06
0
Branch 'interpreter' - 15 commits - configure.ac libswfdec/swfdec_audio_event.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_compiler.c libswfdec/swfdec_image.c libswfdec/swfdec_sprite_movie.c
...bswfdec/swfdec_image.c @@ -657,7 +657,7 @@ swfdec_image_create_surface_transformed for (i = 0; i < n; i++) { ((guint32 *) tdata)[i] = swfdec_color_apply_transform_premultiplied (((guint32 *) sdata)[i], trans); /* optimization: check for alpha channel to speed up compositing */ - has_alpha != tdata[4 * i + SWFDEC_COLOR_INDEX_ALPHA] != 0xFF; + has_alpha = tdata[4 * i + SWFDEC_COLOR_INDEX_ALPHA] != 0xFF; } surface = cairo_image_surface_create_for_data (tdata, has_alpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24, diff-tree f8ad5602edb3223fcc0396a60d6077ad562be7e1 (from...
2007 Dec 11
1
libswfdec/swfdec_image.c
...ec_image.c @@ -662,7 +662,7 @@ swfdec_image_create_surface_transformed (SwfdecImage *image, const SwfdecColorTr for (i = 0; i < n; i++) { tdata[i] = swfdec_color_apply_transform_premultiplied (sdata[i], trans); /* optimization: check for alpha channel to speed up compositing */ - has_alpha = tdata[4 * i + SWFDEC_COLOR_INDEX_ALPHA] != 0xFF; + has_alpha |= SWFDEC_COLOR_A (tdata[i]) != 0xFF; } cairo_surface_destroy (source); surface = cairo_image_surface_create_for_data ((unsigned char *) tdata,
2007 Jan 26
0
libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c
...cae..0cf6502 100644 --- a/libswfdec/swfdec_image.c +++ b/libswfdec/swfdec_image.c @@ -185,15 +185,15 @@ tag_func_define_bits_jpeg (SwfdecSwfDeco } static void -swfdec_image_create_surface (SwfdecImage *image, guint8 *data) +swfdec_image_create_surface (SwfdecImage *image, guint8 *data, gboolean has_alpha) { static const cairo_user_data_key_t key; g_assert (image->surface == NULL); image->surface = cairo_image_surface_create_for_data (data, - CAIRO_FORMAT_ARGB32, image->width, image->height, - image->rowstride); + has_alpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FO...
2007 Dec 10
0
5 commits - libswfdec/jpeg libswfdec/swfdec_as_interpret.c libswfdec/swfdec_bits.c libswfdec/swfdec_cached.c libswfdec/swfdec_codec_adpcm.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_flash_security.c libswfdec/swfdec_image.c
...loc'd @@ -633,8 +636,8 @@ cairo_surface_t * swfdec_image_create_surface_transformed (SwfdecImage *image, const SwfdecColorTransform *trans) { cairo_surface_t *surface, *source; - guint8 *tdata; - const guint8 *sdata; + guint32 *tdata; + const guint32 *sdata; guint i, n; gboolean has_alpha = FALSE; @@ -653,15 +656,16 @@ swfdec_image_create_surface_transformed (SwfdecImage *image, const SwfdecColorTr return NULL; } /* FIXME: This code assumes a rowstride of 4 * width */ - sdata = cairo_image_surface_get_data (source); + /* FIXME: This code assumes an alignment of 4 */ +...
2007 Feb 06
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h libswfdec/swfdec_edittext.c libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_pattern.c libswfdec/swfdec_sprite.c test/dump.c
...ce); image->surface = NULL; + } else if (image->data) { + g_free (image->data); } + image->data = NULL; } static void @@ -185,24 +188,9 @@ tag_func_define_bits_jpeg (SwfdecSwfDeco } static void -swfdec_image_create_surface (SwfdecImage *image, guint8 *data, gboolean has_alpha) -{ - static const cairo_user_data_key_t key; - - g_assert (image->surface == NULL); - - image->surface = cairo_image_surface_create_for_data (data, - has_alpha ? CAIRO_FORMAT_ARGB32 : CAIRO_FORMAT_RGB24, - image->width, image->height, image->rowstride); - cairo_surfac...
2007 Nov 10
1
3 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h
...ot;failed to load image data"); - return FALSE; + if (image->surface == NULL) { + SWFDEC_WARNING ("failed to decode image"); + return NULL; } } else { swfdec_cached_use (SWFDEC_CACHED (image)); } - return TRUE; -} - -static gboolean -swfdec_image_has_alpha (SwfdecImage *image) -{ - return image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2 || - image->type == SWFDEC_IMAGE_TYPE_JPEG3; -} - -cairo_surface_t * -swfdec_image_create_surface (SwfdecImage *image) -{ - static const cairo_user_data_key_t key; - - g_return_val_if_fail (SWFDEC_IS_IMAGE (im...
2007 Jan 29
0
Branch 'interpreter' - 18 commits - libswfdec/swfdec_image.c libswfdec/swfdec_image.h libswfdec/swfdec_js.c libswfdec/swfdec_js_color.c libswfdec/swfdec_js_sound.c libswfdec/swfdec_pattern.c libswfdec/swfdec_scriptable.c libswfdec/swfdec_script.c
...a smarter way diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c index 725ce74..23602c4 100644 --- a/libswfdec/swfdec_image.c +++ b/libswfdec/swfdec_image.c @@ -168,10 +168,18 @@ tag_func_define_bits_jpeg (SwfdecSwfDeco return SWFDEC_STATUS_OK; } +static gboolean +swfdec_image_has_alpha (SwfdecImage *image) +{ + return image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2 || + image->type == SWFDEC_IMAGE_TYPE_JPEG3; +} + static void -swfdec_image_create_surface (SwfdecImage *image, guint8 *data, gboolean has_alpha) +swfdec_image_create_surface (SwfdecImage *image, guint8 *data)...
2011 Apr 08
0
Wine release 1.2.3
...ontinue 25678 'Wine reg add' with longer hive name error 25680 Stale file associations are not properly removed 25685 When printing diagrams & charts in Family Historian 4.1.3 characters are upside down 25691 ImageList_Duplicate doesn't correctly duplicate full length of has_alpha byte array 25910 Notepad tries to open a file using wrong sharing mode 26014 Printing produces garbled output, characters rotated and sliced. 26281 regedit: Doesn't export decent newline in Unicode (NT5) Format. 26367 Winecfg crashes when selecting Graphics tab 26393 Temple of El...
2008 Jun 17
2
[Bug 16395] New: glib abort for "double free or corruption" in jpeg code
...cached = <value optimized out> surface = (cairo_surface_t *) 0x0 source = <value optimized out> tdata = <value optimized out> sdata = <value optimized out> i = <value optimized out> n = <value optimized out> has_alpha = <value optimized out> __PRETTY_FUNCTION__ = "swfdec_image_create_surface_transformed" #12 0xb1aa7017 in swfdec_image_pattern_get_pattern (pat=0xa987d20, renderer=0x974f520, trans=0xbfd7f084) at swfdec_pattern.c:224 pattern = (cairo_pattern_t *) 0x0 surface...
2010 Jun 11
0
Wine release 1.2-rc3
...-files if possible. winapi: Fix a few C parser bugs. kernel32/tests: Fix the process title tests to actually test something. kernel32: Make sure we always have a valid process title. ntdll: Set a valid process title for the initial process. comctl32/imagelist: Grow the has_alpha array also in ImageList_SetImageCount. krnl386: Load gdi.exe and user.exe also when initializing universal thunks. oleaut32: Fix handling of 'c' format for non-date variants in VarTokenizeFormatString. winecfg: Remove the unimplemented device autodetect radio buttons....
2011 Feb 04
0
Wine release 1.3.13
...: Fails to start 25583 Starcraft II fails to start 25636 Mirror's Edge crashes when loading the first mission 25655 Anarchy Online crashes on start-up 25690 Silverfall fails to start (possible Securom issue) 25691 ImageList_Duplicate doesn't correctly duplicate full length of has_alpha byte array 25695 Solo Defender crashes on start, needs msvcr90.dll._realloc_crt 25743 Burger Shop 2 sets invalid permissions on launch 25830 urlmon:sec_mgr tests fail on clang 25845 Compiling fails in kernel32 --without-curses 25856 Unable to type - in cmd anymore. 25860 Raid over...
2010 May 21
0
Wine release 1.2-rc1
...doesn't get freed while it's processing a request. comctl32/imagelist: Pre-multiply the colors by the alpha channel when storing an image with alpha. comctl32/imagelist: Generate the mask from the alpha channel if present. comctl32/imagelist: Fix the allocated size of the has_alpha array. configure: Rename the 64-bit loader to wine64 and keep wine always for the 32-bit loader. winedbg: Don't install the man page in a wow64 build. ntdll: Avoid a compiler warning on NetBSD. winex11: Use the subpixel rendering configuration from fontconfig to override...
2007 Apr 13
0
[954] branches/wxruby2/wxwidgets_282: Additions to Image API 2.6 -> 2.8, remove comment cruft
...sing </del><ins>+Unlike RGB data, not all images have an alpha channel and before using </ins><span class="cx"> "get_alpha":#Image_getalpha you should check if this image contains </span><span class="cx"> an alpha channel with "has_alpha":#Image_hasalpha. Note that currently only </span><span class="cx"> images loaded from PNG files with transparency information will have an alpha </span><span class="lines">@@ -34,7 +34,7 @@ </span><span class="cx"> </span&g...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
...a smarter way diff --git a/libswfdec/swfdec_image.c b/libswfdec/swfdec_image.c index 725ce74..23602c4 100644 --- a/libswfdec/swfdec_image.c +++ b/libswfdec/swfdec_image.c @@ -168,10 +168,18 @@ tag_func_define_bits_jpeg (SwfdecSwfDeco return SWFDEC_STATUS_OK; } +static gboolean +swfdec_image_has_alpha (SwfdecImage *image) +{ + return image->type == SWFDEC_IMAGE_TYPE_LOSSLESS2 || + image->type == SWFDEC_IMAGE_TYPE_JPEG3; +} + static void -swfdec_image_create_surface (SwfdecImage *image, guint8 *data, gboolean has_alpha) +swfdec_image_create_surface (SwfdecImage *image, guint8 *data)...