Parcourir la source

* Do not prefix stock image names with "pipi:", it's redundant.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2757 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam il y a 16 ans
Parent
révision
6a9475464c
2 fichiers modifiés avec 9 ajouts et 8 suppressions
  1. +3
    -2
      pipi/codec.c
  2. +6
    -6
      pipi/stock.c

+ 3
- 2
pipi/codec.c Voir le fichier

@@ -28,8 +28,9 @@

pipi_image_t *pipi_load(char const *name)
{
if(!strncmp(name, "pipi:", 5))
return pipi_load_stock(name + 5);
if(!strncmp(name, "random:", 7) ||
!strncmp(name, "bayer:", 6))
return pipi_load_stock(name);

#if USE_IMLIB2
return pipi_load_imlib2(name);


+ 6
- 6
pipi/stock.c Voir le fichier

@@ -33,12 +33,12 @@ pipi_image_t *pipi_load_stock(char const *name)
float *data;

/* Generate a Bayer dithering pattern. */
if(!strncmp(name, "bayer", 5))
if(!strncmp(name, "bayer:", 6))
{
int i, j, w, h, n;

w = atoi(name + 5);
name = strchr(name + 5, 'x');
w = atoi(name + 6);
name = strchr(name + 6, 'x');
if(!name)
return NULL;
h = atoi(name + 1);
@@ -74,13 +74,13 @@ pipi_image_t *pipi_load_stock(char const *name)
}

/* Generate a completely random image. */
if(!strncmp(name, "random", 6))
if(!strncmp(name, "random:", 7))
{
unsigned int ctx = 1;
int x, y, t, w, h;

w = atoi(name + 6);
name = strchr(name + 6, 'x');
w = atoi(name + 7);
name = strchr(name + 7, 'x');
if(!name)
return NULL;
h = atoi(name + 1);


Chargement…
Annuler
Enregistrer