|
@@ -33,12 +33,12 @@ pipi_image_t *pipi_load_stock(char const *name) |
|
|
float *data; |
|
|
float *data; |
|
|
|
|
|
|
|
|
/* Generate a Bayer dithering pattern. */ |
|
|
/* Generate a Bayer dithering pattern. */ |
|
|
if(!strncmp(name, "bayer", 5)) |
|
|
|
|
|
|
|
|
if(!strncmp(name, "bayer:", 6)) |
|
|
{ |
|
|
{ |
|
|
int i, j, w, h, n; |
|
|
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) |
|
|
if(!name) |
|
|
return NULL; |
|
|
return NULL; |
|
|
h = atoi(name + 1); |
|
|
h = atoi(name + 1); |
|
@@ -74,13 +74,13 @@ pipi_image_t *pipi_load_stock(char const *name) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* Generate a completely random image. */ |
|
|
/* Generate a completely random image. */ |
|
|
if(!strncmp(name, "random", 6)) |
|
|
|
|
|
|
|
|
if(!strncmp(name, "random:", 7)) |
|
|
{ |
|
|
{ |
|
|
unsigned int ctx = 1; |
|
|
unsigned int ctx = 1; |
|
|
int x, y, t, w, h; |
|
|
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) |
|
|
if(!name) |
|
|
return NULL; |
|
|
return NULL; |
|
|
h = atoi(name + 1); |
|
|
h = atoi(name + 1); |
|
|