Sfoglia il codice sorgente

libpipi: sometimes imlib_load_image() succeeds but imlib_image_get_data()

returns NULL. Working around this properly.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2934 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 anni fa
parent
commit
497e7330e8
1 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. +7
    -0
      pipi/codec/imlib.c

+ 7
- 0
pipi/codec/imlib.c Vedi File

@@ -38,6 +38,13 @@ pipi_image_t *pipi_load_imlib2(const char *name)
return NULL;

imlib_context_set_image(priv);

if(!imlib_image_get_data())
{
imlib_free_image();
return NULL;
}

img = pipi_new(imlib_image_get_width(), imlib_image_get_height());

img->p[PIPI_PIXELS_RGBA_C].pixels = imlib_image_get_data();


Caricamento…
Annulla
Salva