Changeset 2757 for libpipi


Ignore:
Timestamp:
Aug 23, 2008, 3:07:30 PM (12 years ago)
Author:
Sam Hocevar
Message:
  • Do not prefix stock image names with "pipi:", it's redundant.
Location:
libpipi/trunk/pipi
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/pipi/codec.c

    r2695 r2757  
    2929pipi_image_t *pipi_load(char const *name)
    3030{
    31     if(!strncmp(name, "pipi:", 5))
    32         return pipi_load_stock(name + 5);
     31    if(!strncmp(name, "random:", 7) ||
     32       !strncmp(name, "bayer:", 6))
     33        return pipi_load_stock(name);
    3334
    3435#if USE_IMLIB2
  • libpipi/trunk/pipi/stock.c

    r2727 r2757  
    3434
    3535    /* Generate a Bayer dithering pattern. */
    36     if(!strncmp(name, "bayer", 5))
     36    if(!strncmp(name, "bayer:", 6))
    3737    {
    3838        int i, j, w, h, n;
    3939
    40         w = atoi(name + 5);
    41         name = strchr(name + 5, 'x');
     40        w = atoi(name + 6);
     41        name = strchr(name + 6, 'x');
    4242        if(!name)
    4343            return NULL;
     
    7575
    7676    /* Generate a completely random image. */
    77     if(!strncmp(name, "random", 6))
     77    if(!strncmp(name, "random:", 7))
    7878    {
    7979        unsigned int ctx = 1;
    8080        int x, y, t, w, h;
    8181
    82         w = atoi(name + 6);
    83         name = strchr(name + 6, 'x');
     82        w = atoi(name + 7);
     83        name = strchr(name + 7, 'x');
    8484        if(!name)
    8585            return NULL;
Note: See TracChangeset for help on using the changeset viewer.