Changeset 3342


Ignore:
Timestamp:
Jan 13, 2009, 12:51:27 AM (12 years ago)
Author:
Sam Hocevar
Message:

Change _C pixel format suffixes into _U8 for more clarity.

Location:
libpipi/trunk
Files:
44 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/examples/edd.c

    r3341 r3342  
    5050    /* Load image, convert it to grayscale, dither it with Floyd-Steinberg */
    5151    img = pipi_load(argv[1]);
    52     pipi_set_colorspace(img, PIPI_PIXELS_Y_F);
     52    pipi_set_colorspace(img, PIPI_PIXELS_Y_F32);
    5353    gauss = pipi_gaussian_blur(img, sigma);
    5454    kernel = pipi_load("ediff:fs");
  • libpipi/trunk/examples/img2rubik.c

    r3341 r3342  
    3535    pipi_image_t *dst = pipi_reduce(src, NCOLORS, mypal);
    3636
    37     pipi_pixels_t *p = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     37    pipi_pixels_t *p = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    3838    float *data = (float *)p->pixels;
    3939    w = p->w;
  • libpipi/trunk/pipi-php/php_pipi.c

    r3340 r3342  
    151151        REGISTER_LONG_CONSTANT("PIPI_SCAN_SERPENTINE", PIPI_SCAN_SERPENTINE, CONST_CS | CONST_PERSISTENT);
    152152        REGISTER_LONG_CONSTANT("PIPI_PIXELS_UNINITIALISED", PIPI_PIXELS_UNINITIALISED, CONST_CS | CONST_PERSISTENT);
    153         REGISTER_LONG_CONSTANT("PIPI_PIXELS_RGBA_C", PIPI_PIXELS_RGBA_C, CONST_CS | CONST_PERSISTENT);
    154         REGISTER_LONG_CONSTANT("PIPI_PIXELS_BGR_C", PIPI_PIXELS_BGR_C, CONST_CS | CONST_PERSISTENT);
    155         REGISTER_LONG_CONSTANT("PIPI_PIXELS_RGBA_F", PIPI_PIXELS_RGBA_F, CONST_CS | CONST_PERSISTENT);
    156         REGISTER_LONG_CONSTANT("PIPI_PIXELS_Y_F", PIPI_PIXELS_Y_F, CONST_CS | CONST_PERSISTENT);
    157         REGISTER_LONG_CONSTANT("PIPI_PIXELS_MASK_C", PIPI_PIXELS_MASK_C, CONST_CS | CONST_PERSISTENT);
     153        REGISTER_LONG_CONSTANT("PIPI_PIXELS_RGBA_U8", PIPI_PIXELS_RGBA_U8, CONST_CS | CONST_PERSISTENT);
     154        REGISTER_LONG_CONSTANT("PIPI_PIXELS_BGR_U8", PIPI_PIXELS_BGR_U8, CONST_CS | CONST_PERSISTENT);
     155        REGISTER_LONG_CONSTANT("PIPI_PIXELS_RGBA_F32", PIPI_PIXELS_RGBA_F32, CONST_CS | CONST_PERSISTENT);
     156        REGISTER_LONG_CONSTANT("PIPI_PIXELS_Y_F32", PIPI_PIXELS_Y_F32, CONST_CS | CONST_PERSISTENT);
     157        REGISTER_LONG_CONSTANT("PIPI_PIXELS_MASK_U8", PIPI_PIXELS_MASK_U8, CONST_CS | CONST_PERSISTENT);
    158158        REGISTER_LONG_CONSTANT("PIPI_PIXELS_MAX", PIPI_PIXELS_MAX, CONST_CS | CONST_PERSISTENT);
    159159        REGISTER_LONG_CONSTANT("PIPI_COLOR_R", PIPI_COLOR_R, CONST_CS | CONST_PERSISTENT);
  • libpipi/trunk/pipi/analysis/histogram.c

    r3341 r3342  
    4444    if(!h) return -1;
    4545
    46     p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_C);
     46    p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8);
    4747    data = (uint8_t *)p->pixels;
    4848    memset(h->a, 0, 256*(sizeof(unsigned int)));
  • libpipi/trunk/pipi/analysis/measure.c

    r3341 r3342  
    4343
    4444    /* FIXME: this is not right */
    45     pipi_get_pixels(i1, PIPI_PIXELS_Y_F);
    46     pipi_get_pixels(i2, PIPI_PIXELS_Y_F);
     45    pipi_get_pixels(i1, PIPI_PIXELS_Y_F32);
     46    pipi_get_pixels(i2, PIPI_PIXELS_Y_F32);
    4747
    48     p1 = (float *)i1->p[PIPI_PIXELS_Y_F].pixels;
    49     p2 = (float *)i2->p[PIPI_PIXELS_Y_F].pixels;
     48    p1 = (float *)i1->p[PIPI_PIXELS_Y_F32].pixels;
     49    p2 = (float *)i2->p[PIPI_PIXELS_Y_F32].pixels;
    5050
    5151    for(y = 0; y < h; y++)
  • libpipi/trunk/pipi/codec/coreimage.m

    r3340 r3342  
    4848    img = pipi_new(w, h);
    4949
    50     img->p[PIPI_PIXELS_RGBA_C].w      = w;
    51     img->p[PIPI_PIXELS_RGBA_C].h      = h;
    52     img->p[PIPI_PIXELS_RGBA_C].pitch  = ([myImage bytesPerRow]/8) * img->w;
    53     img->p[PIPI_PIXELS_RGBA_C].bpp    = [myImage bitsPerPixel];
    54     img->p[PIPI_PIXELS_RGBA_C].bytes  = ([myImage bitsPerPixel]/8) * img->w * img->h;
    55     img->last_modified                = PIPI_PIXELS_RGBA_C;
     50    img->p[PIPI_PIXELS_RGBA_U8].w      = w;
     51    img->p[PIPI_PIXELS_RGBA_U8].h      = h;
     52    img->p[PIPI_PIXELS_RGBA_U8].pitch  = ([myImage bytesPerRow]/8) * img->w;
     53    img->p[PIPI_PIXELS_RGBA_U8].bpp    = [myImage bitsPerPixel];
     54    img->p[PIPI_PIXELS_RGBA_U8].bytes  = ([myImage bitsPerPixel]/8) * img->w * img->h;
     55    img->last_modified                = PIPI_PIXELS_RGBA_U8;
    5656
    5757   
     
    6060     */
    6161   
    62     int pitch = (img->p[PIPI_PIXELS_RGBA_C].bpp/8);
     62    int pitch = (img->p[PIPI_PIXELS_RGBA_U8].bpp/8);
    6363    unsigned char *tmp  = (unsigned char*)malloc(h*w*pitch);
    6464    unsigned char *orig = (unsigned char*)[myImage bitmapData];
     
    8888        o+=a;
    8989    }
    90     img->p[PIPI_PIXELS_RGBA_C].pixels = tmp;
    91     img->p[PIPI_PIXELS_RGBA_C].pitch  = w*([myImage bitsPerPixel]/8);
     90    img->p[PIPI_PIXELS_RGBA_U8].pixels = tmp;
     91    img->p[PIPI_PIXELS_RGBA_U8].pitch  = w*([myImage bitsPerPixel]/8);
    9292   
    9393   
     
    9898    infos->format = [myImage bitmapFormat];
    9999
    100     pipi_pixels_t *p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_C);
     100    pipi_pixels_t *p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8);
    101101   
    102102    img->codec_free = pipi_free_coreimage;
     
    110110{
    111111    NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
    112     pipi_pixels_t *p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_C);
     112    pipi_pixels_t *p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8);
    113113
    114114    int i;
  • libpipi/trunk/pipi/codec/gdi.c

    r3341 r3342  
    5454
    5555    img = pipi_new(binfo.bmiHeader.biWidth, binfo.bmiHeader.biHeight);
    56     p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_C);
     56    p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8);
    5757    data = p->pixels;
    5858
     
    9595    int x, y, padding;
    9696
    97     p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_C);
     97    p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8);
    9898    data = p->pixels;
    9999
  • libpipi/trunk/pipi/codec/gdiplus.cpp

    r3340 r3342  
    6666
    6767    pipi_image_t *img = pipi_new(b->GetWidth(), b->GetHeight());
    68     pipi_pixels_t *p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_C);
     68    pipi_pixels_t *p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8);
    6969    memcpy(p->pixels, bdata.Scan0, bdata.Width * bdata.Height * 4);
    7070
     
    139139    }
    140140
    141     pipi_pixels_t *p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_C);
     141    pipi_pixels_t *p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8);
    142142    memcpy(bdata.Scan0, p->pixels, bdata.Width * bdata.Height * 4);
    143143
  • libpipi/trunk/pipi/codec/imlib.c

    r3341 r3342  
    4848    img = pipi_new(imlib_image_get_width(), imlib_image_get_height());
    4949
    50     img->p[PIPI_PIXELS_RGBA_C].pixels = imlib_image_get_data();
    51     img->p[PIPI_PIXELS_RGBA_C].w = img->w;
    52     img->p[PIPI_PIXELS_RGBA_C].h = img->h;
    53     img->p[PIPI_PIXELS_RGBA_C].pitch = 4 * img->w;
    54     img->p[PIPI_PIXELS_RGBA_C].bpp = 32;
    55     img->p[PIPI_PIXELS_RGBA_C].bytes = 4 * img->w * img->h;
    56     img->last_modified = PIPI_PIXELS_RGBA_C;
     50    img->p[PIPI_PIXELS_RGBA_U8].pixels = imlib_image_get_data();
     51    img->p[PIPI_PIXELS_RGBA_U8].w = img->w;
     52    img->p[PIPI_PIXELS_RGBA_U8].h = img->h;
     53    img->p[PIPI_PIXELS_RGBA_U8].pitch = 4 * img->w;
     54    img->p[PIPI_PIXELS_RGBA_U8].bpp = 32;
     55    img->p[PIPI_PIXELS_RGBA_U8].bytes = 4 * img->w * img->h;
     56    img->last_modified = PIPI_PIXELS_RGBA_U8;
    5757
    5858    img->codec_priv = (void *)priv;
    59     img->codec_format = PIPI_PIXELS_RGBA_C;
     59    img->codec_format = PIPI_PIXELS_RGBA_U8;
    6060    img->codec_free = pipi_free_imlib2;
    6161
     
    7777
    7878        /* FIXME: check pitch differences here */
    79         if(img->last_modified == PIPI_PIXELS_RGBA_C)
     79        if(img->last_modified == PIPI_PIXELS_RGBA_U8)
    8080        {
    81             memcpy(data, img->p[PIPI_PIXELS_RGBA_C].pixels,
     81            memcpy(data, img->p[PIPI_PIXELS_RGBA_U8].pixels,
    8282                   4 * img->w * img->h);
    83             free(img->p[PIPI_PIXELS_RGBA_C].pixels);
     83            free(img->p[PIPI_PIXELS_RGBA_U8].pixels);
    8484        }
    8585
    86         img->p[PIPI_PIXELS_RGBA_C].pixels = data;
    87         img->p[PIPI_PIXELS_RGBA_C].w = imlib_image_get_width();
    88         img->p[PIPI_PIXELS_RGBA_C].h = imlib_image_get_height();
    89         img->p[PIPI_PIXELS_RGBA_C].pitch = 4 * imlib_image_get_width();
    90         img->p[PIPI_PIXELS_RGBA_C].bpp = 32;
    91         img->p[PIPI_PIXELS_RGBA_C].bytes = 4 * img->w * img->h;
     86        img->p[PIPI_PIXELS_RGBA_U8].pixels = data;
     87        img->p[PIPI_PIXELS_RGBA_U8].w = imlib_image_get_width();
     88        img->p[PIPI_PIXELS_RGBA_U8].h = imlib_image_get_height();
     89        img->p[PIPI_PIXELS_RGBA_U8].pitch = 4 * imlib_image_get_width();
     90        img->p[PIPI_PIXELS_RGBA_U8].bpp = 32;
     91        img->p[PIPI_PIXELS_RGBA_U8].bytes = 4 * img->w * img->h;
    9292
    9393        img->codec_priv = (void *)priv;
    94         img->codec_format = PIPI_PIXELS_RGBA_C;
     94        img->codec_format = PIPI_PIXELS_RGBA_U8;
    9595        img->codec_free = pipi_free_imlib2;
    9696
  • libpipi/trunk/pipi/codec/modular/jpeg.c

    r3341 r3342  
    113113    img = pipi_new(cinfo.output_width, cinfo.output_height);
    114114
    115     img->p[PIPI_PIXELS_RGBA_C].pixels = image;
    116     img->p[PIPI_PIXELS_RGBA_C].w = cinfo.output_width;
    117     img->p[PIPI_PIXELS_RGBA_C].h = cinfo.output_height;
    118     img->p[PIPI_PIXELS_RGBA_C].pitch = cinfo.output_width*4;
    119     img->p[PIPI_PIXELS_RGBA_C].bpp = 24;
    120     img->p[PIPI_PIXELS_RGBA_C].bytes = 4 * img->w * img->h;
    121     img->last_modified = PIPI_PIXELS_RGBA_C;
     115    img->p[PIPI_PIXELS_RGBA_U8].pixels = image;
     116    img->p[PIPI_PIXELS_RGBA_U8].w = cinfo.output_width;
     117    img->p[PIPI_PIXELS_RGBA_U8].h = cinfo.output_height;
     118    img->p[PIPI_PIXELS_RGBA_U8].pitch = cinfo.output_width*4;
     119    img->p[PIPI_PIXELS_RGBA_U8].bpp = 24;
     120    img->p[PIPI_PIXELS_RGBA_U8].bytes = 4 * img->w * img->h;
     121    img->last_modified = PIPI_PIXELS_RGBA_U8;
    122122
    123123    img->codec_priv = (void *)&cinfo;
    124     img->codec_format = PIPI_PIXELS_RGBA_C;
     124    img->codec_format = PIPI_PIXELS_RGBA_U8;
    125125    img->codec_free = pipi_free_jpeg;
    126126
     
    144144    unsigned char *line = NULL;
    145145
    146     pipi_pixels_t *pixels = pipi_get_pixels(img, PIPI_PIXELS_RGBA_C);
     146    pipi_pixels_t *pixels = pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8);
    147147
    148148    if (!pixels)
     
    213213static int pipi_free_jpeg(pipi_image_t *img)
    214214{
    215     if(img->p[PIPI_PIXELS_RGBA_C].pixels)
    216         free(img->p[PIPI_PIXELS_RGBA_C].pixels);
     215    if(img->p[PIPI_PIXELS_RGBA_U8].pixels)
     216        free(img->p[PIPI_PIXELS_RGBA_U8].pixels);
    217217    return 0;
    218218}
  • libpipi/trunk/pipi/codec/opencv.c

    r3341 r3342  
    4444    img = pipi_new(priv->width, priv->height);
    4545
    46     img->p[PIPI_PIXELS_BGR_C].pixels = priv->imageData;
    47     img->p[PIPI_PIXELS_BGR_C].w = priv->width;
    48     img->p[PIPI_PIXELS_BGR_C].h = priv->height;
    49     img->p[PIPI_PIXELS_BGR_C].pitch = priv->widthStep;
    50     img->p[PIPI_PIXELS_BGR_C].bpp = 24;
    51     img->p[PIPI_PIXELS_BGR_C].bytes = 3 * img->w * img->h;
    52     img->last_modified = PIPI_PIXELS_BGR_C;
     46    img->p[PIPI_PIXELS_BGR_U8].pixels = priv->imageData;
     47    img->p[PIPI_PIXELS_BGR_U8].w = priv->width;
     48    img->p[PIPI_PIXELS_BGR_U8].h = priv->height;
     49    img->p[PIPI_PIXELS_BGR_U8].pitch = priv->widthStep;
     50    img->p[PIPI_PIXELS_BGR_U8].bpp = 24;
     51    img->p[PIPI_PIXELS_BGR_U8].bytes = 3 * img->w * img->h;
     52    img->last_modified = PIPI_PIXELS_BGR_U8;
    5353
    5454    img->codec_priv = (void *)priv;
    55     img->codec_format = PIPI_PIXELS_BGR_C;
     55    img->codec_format = PIPI_PIXELS_BGR_U8;
    5656    img->codec_free = pipi_free_opencv;
    5757
     
    7070
    7171        /* FIXME: check pitch differences here */
    72         if(img->last_modified == PIPI_PIXELS_BGR_C)
     72        if(img->last_modified == PIPI_PIXELS_BGR_U8)
    7373        {
    74             memcpy(priv->imageData, img->p[PIPI_PIXELS_BGR_C].pixels,
     74            memcpy(priv->imageData, img->p[PIPI_PIXELS_BGR_U8].pixels,
    7575                   3 * img->w * img->h);
    76             free(img->p[PIPI_PIXELS_BGR_C].pixels);
     76            free(img->p[PIPI_PIXELS_BGR_U8].pixels);
    7777        }
    7878
    79         img->p[PIPI_PIXELS_BGR_C].pixels = priv->imageData;
    80         img->p[PIPI_PIXELS_BGR_C].w = priv->width;
    81         img->p[PIPI_PIXELS_BGR_C].h = priv->height;
    82         img->p[PIPI_PIXELS_BGR_C].pitch = priv->widthStep;
    83         img->p[PIPI_PIXELS_BGR_C].bpp = 24;
    84         img->p[PIPI_PIXELS_BGR_C].bytes = 3 * img->w * img->h;
     79        img->p[PIPI_PIXELS_BGR_U8].pixels = priv->imageData;
     80        img->p[PIPI_PIXELS_BGR_U8].w = priv->width;
     81        img->p[PIPI_PIXELS_BGR_U8].h = priv->height;
     82        img->p[PIPI_PIXELS_BGR_U8].pitch = priv->widthStep;
     83        img->p[PIPI_PIXELS_BGR_U8].bpp = 24;
     84        img->p[PIPI_PIXELS_BGR_U8].bytes = 3 * img->w * img->h;
    8585
    8686        img->codec_priv = (void *)priv;
    87         img->codec_format = PIPI_PIXELS_BGR_C;
     87        img->codec_format = PIPI_PIXELS_BGR_U8;
    8888        img->codec_free = pipi_free_opencv;
    8989
  • libpipi/trunk/pipi/codec/oric.c

    r3341 r3342  
    6565
    6666    img = pipi_new(WIDTH, HEIGHT);
    67     p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_C);
     67    p = pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8);
    6868    data = p->pixels;
    6969
     
    145145    else
    146146        tmp = img;
    147     p = pipi_get_pixels(tmp, PIPI_PIXELS_RGBA_F);
     147    p = pipi_get_pixels(tmp, PIPI_PIXELS_RGBA_F32);
    148148    data = p->pixels;
    149149    screen = malloc(WIDTH * HEIGHT / 6);
  • libpipi/trunk/pipi/codec/sdl.c

    r3341 r3342  
    4949    img = pipi_new(priv->w, priv->h);
    5050
    51     img->p[PIPI_PIXELS_RGBA_C].pixels = priv->pixels;
    52     img->p[PIPI_PIXELS_RGBA_C].w = priv->w;
    53     img->p[PIPI_PIXELS_RGBA_C].h = priv->h;
    54     img->p[PIPI_PIXELS_RGBA_C].pitch = priv->pitch;
    55     img->p[PIPI_PIXELS_RGBA_C].bpp = 32;
    56     img->p[PIPI_PIXELS_RGBA_C].bytes = 4 * img->w * img->h;
    57     img->last_modified = PIPI_PIXELS_RGBA_C;
     51    img->p[PIPI_PIXELS_RGBA_U8].pixels = priv->pixels;
     52    img->p[PIPI_PIXELS_RGBA_U8].w = priv->w;
     53    img->p[PIPI_PIXELS_RGBA_U8].h = priv->h;
     54    img->p[PIPI_PIXELS_RGBA_U8].pitch = priv->pitch;
     55    img->p[PIPI_PIXELS_RGBA_U8].bpp = 32;
     56    img->p[PIPI_PIXELS_RGBA_U8].bytes = 4 * img->w * img->h;
     57    img->last_modified = PIPI_PIXELS_RGBA_U8;
    5858
    5959    img->codec_priv = (void *)priv;
    60     img->codec_format = PIPI_PIXELS_RGBA_C;
     60    img->codec_format = PIPI_PIXELS_RGBA_U8;
    6161    img->codec_free = pipi_free_sdl;
    6262
     
    7474
    7575        /* FIXME: check pitch differences here */
    76         if(img->last_modified == PIPI_PIXELS_RGBA_C)
     76        if(img->last_modified == PIPI_PIXELS_RGBA_U8)
    7777        {
    78             memcpy(priv->pixels, img->p[PIPI_PIXELS_RGBA_C].pixels,
     78            memcpy(priv->pixels, img->p[PIPI_PIXELS_RGBA_U8].pixels,
    7979                   priv->pitch * priv->h);
    80             free(img->p[PIPI_PIXELS_RGBA_C].pixels);
     80            free(img->p[PIPI_PIXELS_RGBA_U8].pixels);
    8181        }
    8282
    83         img->p[PIPI_PIXELS_RGBA_C].pixels = priv->pixels;
    84         img->p[PIPI_PIXELS_RGBA_C].w = priv->w;
    85         img->p[PIPI_PIXELS_RGBA_C].h = priv->h;
    86         img->p[PIPI_PIXELS_RGBA_C].pitch = priv->pitch;
    87         img->p[PIPI_PIXELS_RGBA_C].bpp = 32;
    88         img->p[PIPI_PIXELS_RGBA_C].bytes = 4 * img->w * img->h;
     83        img->p[PIPI_PIXELS_RGBA_U8].pixels = priv->pixels;
     84        img->p[PIPI_PIXELS_RGBA_U8].w = priv->w;
     85        img->p[PIPI_PIXELS_RGBA_U8].h = priv->h;
     86        img->p[PIPI_PIXELS_RGBA_U8].pitch = priv->pitch;
     87        img->p[PIPI_PIXELS_RGBA_U8].bpp = 32;
     88        img->p[PIPI_PIXELS_RGBA_U8].bytes = 4 * img->w * img->h;
    8989
    9090        img->codec_priv = (void *)priv;
    91         img->codec_format = PIPI_PIXELS_RGBA_C;
     91        img->codec_format = PIPI_PIXELS_RGBA_U8;
    9292        img->codec_free = pipi_free_sdl;
    9393
  • libpipi/trunk/pipi/combine/mean.c

    r3340 r3342  
    3838
    3939    dst = pipi_new(w, h);
    40     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     40    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    4141    dstdata = (float *)dstp->pixels;
    4242
    43     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
     43    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
    4444    img1data = (float *)img1p->pixels;
    45     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     45    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    4646    img2data = (float *)img2p->pixels;
    4747
  • libpipi/trunk/pipi/combine/minmax.c

    r3340 r3342  
    3838
    3939    dst = pipi_new(w, h);
    40     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     40    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    4141    dstdata = (float *)dstp->pixels;
    4242
    43     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
     43    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
    4444    img1data = (float *)img1p->pixels;
    45     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     45    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    4646    img2data = (float *)img2p->pixels;
    4747
     
    8787
    8888    dst = pipi_new(w, h);
    89     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     89    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    9090    dstdata = (float *)dstp->pixels;
    9191
    92     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
     92    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
    9393    img1data = (float *)img1p->pixels;
    94     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     94    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    9595    img2data = (float *)img2p->pixels;
    9696
  • libpipi/trunk/pipi/combine/mulscreen.c

    r3340 r3342  
    3838
    3939    dst = pipi_new(w, h);
    40     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
    41     dstdata = (float *)dstp->pixels;
    42 
    43     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
    44     img1data = (float *)img1p->pixels;
    45     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     40    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
     41    dstdata = (float *)dstp->pixels;
     42
     43    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
     44    img1data = (float *)img1p->pixels;
     45    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    4646    img2data = (float *)img2p->pixels;
    4747
     
    8787
    8888    dst = pipi_new(w, h);
    89     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
    90     dstdata = (float *)dstp->pixels;
    91 
    92     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
    93     img1data = (float *)img1p->pixels;
    94     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     89    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
     90    dstdata = (float *)dstp->pixels;
     91
     92    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
     93    img1data = (float *)img1p->pixels;
     94    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    9595    img2data = (float *)img2p->pixels;
    9696
     
    136136
    137137    dst = pipi_new(w, h);
    138     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
    139     dstdata = (float *)dstp->pixels;
    140 
    141     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
    142     img1data = (float *)img1p->pixels;
    143     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     138    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
     139    dstdata = (float *)dstp->pixels;
     140
     141    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
     142    img1data = (float *)img1p->pixels;
     143    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    144144    img2data = (float *)img2p->pixels;
    145145
     
    185185
    186186    dst = pipi_new(w, h);
    187     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
    188     dstdata = (float *)dstp->pixels;
    189 
    190     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
    191     img1data = (float *)img1p->pixels;
    192     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     187    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
     188    dstdata = (float *)dstp->pixels;
     189
     190    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
     191    img1data = (float *)img1p->pixels;
     192    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    193193    img2data = (float *)img2p->pixels;
    194194
  • libpipi/trunk/pipi/combine/rgb.c

    r3340 r3342  
    3838
    3939    dst = pipi_new(w, h);
    40     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     40    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    4141    dstdata = (float *)dstp->pixels;
    4242
    43     i1p = pipi_get_pixels(i1, PIPI_PIXELS_Y_F);
     43    i1p = pipi_get_pixels(i1, PIPI_PIXELS_Y_F32);
    4444    i1data = (float *)i1p->pixels;
    45     i2p = pipi_get_pixels(i2, PIPI_PIXELS_Y_F);
     45    i2p = pipi_get_pixels(i2, PIPI_PIXELS_Y_F32);
    4646    i2data = (float *)i2p->pixels;
    47     i3p = pipi_get_pixels(i3, PIPI_PIXELS_Y_F);
     47    i3p = pipi_get_pixels(i3, PIPI_PIXELS_Y_F32);
    4848    i3data = (float *)i3p->pixels;
    4949
     
    7373
    7474    dst = pipi_new(w, h);
    75     dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F);
     75    dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F32);
    7676    dstdata = (float *)dstp->pixels;
    7777
    78     srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     78    srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    7979    srcdata = (float *)srcp->pixels;
    8080
     
    9797
    9898    dst = pipi_new(w, h);
    99     dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F);
     99    dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F32);
    100100    dstdata = (float *)dstp->pixels;
    101101
    102     srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     102    srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    103103    srcdata = (float *)srcp->pixels;
    104104
     
    121121
    122122    dst = pipi_new(w, h);
    123     dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F);
     123    dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F32);
    124124    dstdata = (float *)dstp->pixels;
    125125
    126     srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     126    srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    127127    srcdata = (float *)srcp->pixels;
    128128
  • libpipi/trunk/pipi/combine/subadd.c

    r3340 r3342  
    3939
    4040    dst = pipi_new(w, h);
    41     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     41    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    4242    dstdata = (float *)dstp->pixels;
    4343
    44     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
     44    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
    4545    img1data = (float *)img1p->pixels;
    46     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     46    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    4747    img2data = (float *)img2p->pixels;
    4848
     
    8888
    8989    dst = pipi_new(w, h);
    90     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     90    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    9191    dstdata = (float *)dstp->pixels;
    9292
    93     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
     93    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
    9494    img1data = (float *)img1p->pixels;
    95     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     95    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    9696    img2data = (float *)img2p->pixels;
    9797
     
    137137
    138138    dst = pipi_new(w, h);
    139     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     139    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    140140    dstdata = (float *)dstp->pixels;
    141141
    142     img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F);
     142    img1p = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_F32);
    143143    img1data = (float *)img1p->pixels;
    144     img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
     144    img2p = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
    145145    img2data = (float *)img2p->pixels;
    146146
  • libpipi/trunk/pipi/context.c

    r3340 r3342  
    704704        if(ctx->nimages < 1)
    705705            return -1;
    706         pipi_get_pixels(ctx->images[ctx->nimages - 1], PIPI_PIXELS_Y_F);
     706        pipi_get_pixels(ctx->images[ctx->nimages - 1], PIPI_PIXELS_Y_F32);
    707707    }
    708708    else if(!strcmp(cmd, "free"))
  • libpipi/trunk/pipi/dither/dbs.c

    r3340 r3342  
    7070
    7171    src = pipi_copy(img);
    72     pipi_get_pixels(src, PIPI_PIXELS_Y_F);
     72    pipi_get_pixels(src, PIPI_PIXELS_Y_F32);
    7373
    7474    tmp1 = pipi_convolution(src, NN, NN, kernel);
    75     tmp1p = pipi_get_pixels(tmp1, PIPI_PIXELS_Y_F);
     75    tmp1p = pipi_get_pixels(tmp1, PIPI_PIXELS_Y_F32);
    7676    tmp1data = (float *)tmp1p->pixels;
    7777
    7878    dst = pipi_dither_random(src);
    79     dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F);
     79    dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F32);
    8080    dstdata = (float *)dstp->pixels;
    8181
     
    8383
    8484    tmp2 = pipi_convolution(dst, NN, NN, kernel);
    85     tmp2p = pipi_get_pixels(tmp2, PIPI_PIXELS_Y_F);
     85    tmp2p = pipi_get_pixels(tmp2, PIPI_PIXELS_Y_F32);
    8686    tmp2data = (float *)tmp2p->pixels;
    8787
  • libpipi/trunk/pipi/dither/ediff.c

    r3340 r3342  
    4242
    4343    dst = pipi_copy(img);
    44     dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F);
     44    dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F32);
    4545    dstdata = (float *)dstp->pixels;
    4646
    47     kerp = pipi_get_pixels(ker, PIPI_PIXELS_Y_F);
     47    kerp = pipi_get_pixels(ker, PIPI_PIXELS_Y_F32);
    4848    kerdata = (float *)kerp->pixels;
    4949    for(kx = 0; kx < kw; kx++)
  • libpipi/trunk/pipi/dither/ordered.c

    r3340 r3342  
    6464
    6565    dst = pipi_copy(img);
    66     dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F);
     66    dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F32);
    6767    dstdata = (float *)dstp->pixels;
    6868
    69     kernelp = pipi_get_pixels(kernel, PIPI_PIXELS_Y_F);
     69    kernelp = pipi_get_pixels(kernel, PIPI_PIXELS_Y_F32);
    7070    kerneldata = (float *)kernelp->pixels;
    7171
     
    113113    epsilon = 1. / (w * h + 1);
    114114
    115     srcp = pipi_get_pixels(src, PIPI_PIXELS_Y_F);
     115    srcp = pipi_get_pixels(src, PIPI_PIXELS_Y_F32);
    116116    srcdata = (float *)srcp->pixels;
    117117
    118118    dst = pipi_new(w, h);
    119     dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F);
     119    dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F32);
    120120    dstdata = (float *)dstp->pixels;
    121121
  • libpipi/trunk/pipi/dither/ostromoukhov.c

    r3340 r3342  
    7777
    7878    dst = pipi_copy(img);
    79     dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F);
     79    dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F32);
    8080    dstdata = (float *)dstp->pixels;
    8181
  • libpipi/trunk/pipi/dither/random.c

    r3340 r3342  
    3434
    3535    dst = pipi_copy(img);
    36     dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F);
     36    dstp = pipi_get_pixels(dst, PIPI_PIXELS_Y_F32);
    3737    dstdata = (float *)dstp->pixels;
    3838
  • libpipi/trunk/pipi/filter/autocontrast.c

    r3340 r3342  
    4040    h = src->h;
    4141
    42     gray = (src->last_modified == PIPI_PIXELS_Y_F);
     42    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
    4343
    44     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    45                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     44    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     45                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    4646    srcdata = (float *)srcp->pixels;
    4747
     
    8181
    8282    dst = pipi_new(w, h);
    83     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    84                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     83    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     84                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    8585    dstdata = (float *)dstp->pixels;
    8686
  • libpipi/trunk/pipi/filter/blur.c

    r3340 r3342  
    136136    if(src->wrap)
    137137    {
    138         if(src->last_modified == PIPI_PIXELS_Y_F)
     138        if(src->last_modified == PIPI_PIXELS_Y_F32)
    139139            return boxblur_gray_wrap(src, m, n);
    140140
     
    143143    else
    144144    {
    145         if(src->last_modified == PIPI_PIXELS_Y_F)
     145        if(src->last_modified == PIPI_PIXELS_Y_F32)
    146146            return boxblur_gray(src, m, n);
    147147
     
    164164    size = (2 * m + 1) * (2 * n + 1);
    165165
    166     srcp = FLAG_GRAY ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    167                      : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     166    srcp = FLAG_GRAY ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     167                     : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    168168    srcdata = (float *)srcp->pixels;
    169169
    170170    dst = pipi_new(w, h);
    171     dstp = FLAG_GRAY ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    172                      : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     171    dstp = FLAG_GRAY ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     172                     : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    173173    dstdata = (float *)dstp->pixels;
    174174
  • libpipi/trunk/pipi/filter/color.c

    r3340 r3342  
    3737    h = src->h;
    3838
    39     gray = (src->last_modified == PIPI_PIXELS_Y_F);
    40 
    41     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    42                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
    43     srcdata = (float *)srcp->pixels;
    44 
    45     dst = pipi_new(w, h);
    46     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    47                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     39    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
     40
     41    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     42                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
     43    srcdata = (float *)srcp->pixels;
     44
     45    dst = pipi_new(w, h);
     46    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     47                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    4848    dstdata = (float *)dstp->pixels;
    4949
     
    118118    h = src->h;
    119119
    120     gray = (src->last_modified == PIPI_PIXELS_Y_F);
    121 
    122     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    123                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
    124     srcdata = (float *)srcp->pixels;
    125 
    126     dst = pipi_new(w, h);
    127     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    128                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     120    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
     121
     122    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     123                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
     124    srcdata = (float *)srcp->pixels;
     125
     126    dst = pipi_new(w, h);
     127    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     128                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    129129    dstdata = (float *)dstp->pixels;
    130130
     
    209209    h = src->h;
    210210
    211     gray = (src->last_modified == PIPI_PIXELS_Y_F);
    212 
    213     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    214                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
    215     srcdata = (float *)srcp->pixels;
    216 
    217     dst = pipi_new(w, h);
    218     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    219                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     211    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
     212
     213    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     214                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
     215    srcdata = (float *)srcp->pixels;
     216
     217    dst = pipi_new(w, h);
     218    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     219                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    220220    dstdata = (float *)dstp->pixels;
    221221
     
    253253    h = src->h;
    254254
    255     gray = (src->last_modified == PIPI_PIXELS_Y_F);
    256 
    257     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    258                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
    259     srcdata = (float *)srcp->pixels;
    260 
    261     dst = pipi_new(w, h);
    262     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    263                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     255    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
     256
     257    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     258                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
     259    srcdata = (float *)srcp->pixels;
     260
     261    dst = pipi_new(w, h);
     262    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     263                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    264264    dstdata = (float *)dstp->pixels;
    265265
  • libpipi/trunk/pipi/filter/convolution.c

    r3340 r3342  
    7171            if(fabs(p - q) > 0.0001 * 0.0001)
    7272            {
    73                 if(src->last_modified == PIPI_PIXELS_Y_F)
     73                if(src->last_modified == PIPI_PIXELS_Y_F32)
    7474                {
    7575                    if(src->wrap)
     
    9797        vvec[j] = mat[j * m + besti] / tmp;
    9898
    99     if(src->last_modified == PIPI_PIXELS_Y_F)
     99    if(src->last_modified == PIPI_PIXELS_Y_F32)
    100100        ret = src->wrap ? sepconv_gray_wrap(src, m, hvec, n, vvec)
    101101                        : sepconv_gray(src, m, hvec, n, vvec);
     
    122122    h = src->h;
    123123
    124     srcp = FLAG_GRAY ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    125                      : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     124    srcp = FLAG_GRAY ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     125                     : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    126126    srcdata = (float *)srcp->pixels;
    127127
    128128    dst = pipi_new(w, h);
    129     dstp = FLAG_GRAY ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    130                      : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     129    dstp = FLAG_GRAY ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     130                     : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    131131    dstdata = (float *)dstp->pixels;
    132132
     
    190190    h = src->h;
    191191
    192     srcp = FLAG_GRAY ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    193                      : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     192    srcp = FLAG_GRAY ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     193                     : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    194194    srcdata = (float *)srcp->pixels;
    195195
    196196    dst = pipi_new(w, h);
    197     dstp = FLAG_GRAY ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    198                      : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     197    dstp = FLAG_GRAY ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     198                     : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    199199    dstdata = (float *)dstp->pixels;
    200200
  • libpipi/trunk/pipi/filter/dilate.c

    r3340 r3342  
    4141    h = src->h;
    4242
    43     gray = (src->last_modified == PIPI_PIXELS_Y_F);
     43    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
    4444
    45     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    46                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     45    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     46                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    4747    srcdata = (float *)srcp->pixels;
    4848
    4949    dst = pipi_new(w, h);
    50     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    51                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     50    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     51                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    5252    dstdata = (float *)dstp->pixels;
    5353
     
    110110    h = src->h;
    111111
    112     gray = (src->last_modified == PIPI_PIXELS_Y_F);
     112    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
    113113
    114     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    115                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     114    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     115                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    116116    srcdata = (float *)srcp->pixels;
    117117
    118118    dst = pipi_new(w, h);
    119     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    120                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     119    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     120                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    121121    dstdata = (float *)dstp->pixels;
    122122
  • libpipi/trunk/pipi/filter/median.c

    r3340 r3342  
    5656    size = (2 * rx + 1) * (2 * ry + 1);
    5757
    58     gray = (src->last_modified == PIPI_PIXELS_Y_F);
     58    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
    5959
    60     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    61                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     60    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     61                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    6262    srcdata = (float *)srcp->pixels;
    6363
    6464    dst = pipi_new(w, h);
    65     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    66                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     65    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     66                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    6767    dstdata = (float *)dstp->pixels;
    6868
  • libpipi/trunk/pipi/filter/transform.c

    r3340 r3342  
    3737    h = src->h;
    3838
    39     gray = (src->last_modified == PIPI_PIXELS_Y_F);
    40 
    41     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    42                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     39    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
     40
     41    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     42                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    4343    srcdata = (float *)srcp->pixels;
    4444
    4545    dst = pipi_new(w, h);
    46     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    47                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     46    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     47                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    4848    dstdata = (float *)dstp->pixels;
    4949
     
    8383    h = src->h;
    8484
    85     gray = (src->last_modified == PIPI_PIXELS_Y_F);
    86 
    87     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    88                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     85    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
     86
     87    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     88                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    8989    srcdata = (float *)srcp->pixels;
    9090
    9191    dst = pipi_new(w, h);
    92     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    93                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     92    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     93                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    9494    dstdata = (float *)dstp->pixels;
    9595
     
    123123    h = src->h;
    124124
    125     gray = (src->last_modified == PIPI_PIXELS_Y_F);
    126 
    127     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    128                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     125    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
     126
     127    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     128                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    129129    srcdata = (float *)srcp->pixels;
    130130
    131131    dst = pipi_new(h, w);
    132     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    133                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     132    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     133                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    134134    dstdata = (float *)dstp->pixels;
    135135
     
    169169    h = src->h;
    170170
    171     gray = (src->last_modified == PIPI_PIXELS_Y_F);
    172 
    173     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    174                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     171    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
     172
     173    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     174                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    175175    srcdata = (float *)srcp->pixels;
    176176
    177177    dst = pipi_new(w, h);
    178     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    179                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     178    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     179                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    180180    dstdata = (float *)dstp->pixels;
    181181
     
    215215    h = src->h;
    216216
    217     gray = (src->last_modified == PIPI_PIXELS_Y_F);
    218 
    219     srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F)
    220                 : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     217    gray = (src->last_modified == PIPI_PIXELS_Y_F32);
     218
     219    srcp = gray ? pipi_get_pixels(src, PIPI_PIXELS_Y_F32)
     220                : pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    221221    srcdata = (float *)srcp->pixels;
    222222
    223223    dst = pipi_new(h, w);
    224     dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    225                 : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     224    dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     225                : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    226226    dstdata = (float *)dstp->pixels;
    227227
  • libpipi/trunk/pipi/paint/bezier.c

    r2902 r3342  
    3535                      uint32_t c, int n, int aa)
    3636{
    37     if(img->last_modified == PIPI_PIXELS_RGBA_C)
     37    if(img->last_modified == PIPI_PIXELS_RGBA_U8)
    3838    {
    3939        float t;
  • libpipi/trunk/pipi/paint/floodfill.c

    r3340 r3342  
    7878
    7979
    80     if(src->last_modified == PIPI_PIXELS_RGBA_C) {
     80    if(src->last_modified == PIPI_PIXELS_RGBA_U8) {
    8181        uint32_t  *dstdata;
    8282        unsigned char nr, ng, nb, na;
    8383
    8484        /* Get ARGB32 pointer */
    85         dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_C);
     85        dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_U8);
    8686        dstdata = (uint32_t *)dstp->pixels;
    8787
     
    9696
    9797    } else {
    98         int gray = (dst->last_modified == PIPI_PIXELS_Y_F);
     98        int gray = (dst->last_modified == PIPI_PIXELS_Y_F32);
    9999        float *dstdata;
    100100        float or, og, ob, oa;
    101101
    102         dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F)
    103             : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     102        dstp = gray ? pipi_get_pixels(dst, PIPI_PIXELS_Y_F32)
     103            : pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    104104
    105105        dstdata = (float *)dstp->pixels;
  • libpipi/trunk/pipi/paint/line.c

    r3340 r3342  
    6868
    6969    /* No Transparency routine for u32 yet, fallback to float version */
    70     if(img->last_modified == PIPI_PIXELS_RGBA_C)
     70    if(img->last_modified == PIPI_PIXELS_RGBA_U8)
    7171    {
    7272        if(!aa)
    7373        {
    7474            uint32_t  *dstdata;
    75             dstdata = (uint32_t *)pipi_get_pixels(img, PIPI_PIXELS_RGBA_C)->pixels;
     75            dstdata = (uint32_t *)pipi_get_pixels(img, PIPI_PIXELS_RGBA_U8)->pixels;
    7676            s.color32 = c;
    7777            s.buf_u32 = dstdata;
     
    8181        {
    8282            float  *dstdata;
    83             dstdata = (float *)pipi_get_pixels(img, PIPI_PIXELS_RGBA_F)->pixels;
     83            dstdata = (float *)pipi_get_pixels(img, PIPI_PIXELS_RGBA_F32)->pixels;
    8484            s.colorf[2] = ((c&0x00FF0000)>>16)/255.0f; /* XXX FIXME */
    8585            s.colorf[1] = ((c&0x0000FF00)>>8)/255.0f;  /* XXX FIXME */
     
    8989        }
    9090    }
    91     else if(img->last_modified == PIPI_PIXELS_Y_F)
     91    else if(img->last_modified == PIPI_PIXELS_Y_F32)
    9292    {
    9393        float  *dstdata;
    94         dstdata = (float *)pipi_get_pixels(img, PIPI_PIXELS_Y_F)->pixels;
     94        dstdata = (float *)pipi_get_pixels(img, PIPI_PIXELS_Y_F32)->pixels;
    9595        s.colorf[0] = (c & 0xff) / 255.0f; /* XXX FIXME */
    9696        s.buf_f = dstdata;
     
    100100    {
    101101        float  *dstdata;
    102         dstdata = (float *)pipi_get_pixels(img, PIPI_PIXELS_RGBA_F)->pixels;
     102        dstdata = (float *)pipi_get_pixels(img, PIPI_PIXELS_RGBA_F32)->pixels;
    103103        s.colorf[2] = ((c&0x00FF0000)>>16)/255.0f; /* XXX FIXME */
    104104        s.colorf[1] = ((c&0x0000FF00)>>8)/255.0f;  /* XXX FIXME */
  • libpipi/trunk/pipi/paint/tile.c

    r3340 r3342  
    3535
    3636    dst = pipi_new(w, h);
    37     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     37    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    3838    dstdata = (float *)dstp->pixels;
    3939
    40     tilep = pipi_get_pixels(tile, PIPI_PIXELS_RGBA_F);
     40    tilep = pipi_get_pixels(tile, PIPI_PIXELS_RGBA_F32);
    4141    tiledata = (float *)tilep->pixels;
    4242
  • libpipi/trunk/pipi/pipi.h

    r3341 r3342  
    4646
    4747/* pipi_format_t: this enum is a list of all possible pixel formats for
    48  * our internal images. RGBA32 is the most usual format when an image has
    49  * just been loaded, but RGBA_F is a lot better for complex operations. */
     48 * our internal images. RGBA_U8 is the most usual format when an image has
     49 * just been loaded, but RGBA_F32 is a lot better for complex operations. */
    5050typedef enum
    5151{
    5252    PIPI_PIXELS_UNINITIALISED = -1,
    5353
    54     PIPI_PIXELS_RGBA_C = 0,
    55     PIPI_PIXELS_BGR_C = 1,
    56     PIPI_PIXELS_RGBA_F = 2,
    57     PIPI_PIXELS_Y_F = 3,
    58 
    59     PIPI_PIXELS_MASK_C = 4,
     54    PIPI_PIXELS_RGBA_U8 = 0,
     55    PIPI_PIXELS_BGR_U8 = 1,
     56    PIPI_PIXELS_RGBA_F32 = 2,
     57    PIPI_PIXELS_Y_F32 = 3,
     58
     59    PIPI_PIXELS_MASK_U8 = 4,
    6060
    6161    PIPI_PIXELS_MAX = 5
  • libpipi/trunk/pipi/pixels.c

    r3341 r3342  
    4949
    5050    /* Handle special cases */
    51     if(type == PIPI_PIXELS_MASK_C)
     51    if(type == PIPI_PIXELS_MASK_U8)
    5252        return &img->p[type];
    5353
    5454    /* Preliminary conversions */
    55     if(img->last_modified == PIPI_PIXELS_RGBA_C
    56                   && type == PIPI_PIXELS_Y_F)
    57         pipi_get_pixels(img, PIPI_PIXELS_RGBA_F);
    58     else if(img->last_modified == PIPI_PIXELS_BGR_C
    59                        && type == PIPI_PIXELS_Y_F)
    60         pipi_get_pixels(img, PIPI_PIXELS_RGBA_F);
    61     else if(img->last_modified == PIPI_PIXELS_Y_F
    62                        && type == PIPI_PIXELS_RGBA_C)
    63         pipi_get_pixels(img, PIPI_PIXELS_RGBA_F);
    64     else if(img->last_modified == PIPI_PIXELS_Y_F
    65                        && type == PIPI_PIXELS_BGR_C)
    66         pipi_get_pixels(img, PIPI_PIXELS_RGBA_F);
     55    if(img->last_modified == PIPI_PIXELS_RGBA_U8
     56                  && type == PIPI_PIXELS_Y_F32)
     57        pipi_get_pixels(img, PIPI_PIXELS_RGBA_F32);
     58    else if(img->last_modified == PIPI_PIXELS_BGR_U8
     59                       && type == PIPI_PIXELS_Y_F32)
     60        pipi_get_pixels(img, PIPI_PIXELS_RGBA_F32);
     61    else if(img->last_modified == PIPI_PIXELS_Y_F32
     62                       && type == PIPI_PIXELS_RGBA_U8)
     63        pipi_get_pixels(img, PIPI_PIXELS_RGBA_F32);
     64    else if(img->last_modified == PIPI_PIXELS_Y_F32
     65                       && type == PIPI_PIXELS_BGR_U8)
     66        pipi_get_pixels(img, PIPI_PIXELS_RGBA_F32);
    6767
    6868    /* Allocate pixels if necessary */
     
    7171        switch(type)
    7272        {
    73         case PIPI_PIXELS_RGBA_C:
     73        case PIPI_PIXELS_RGBA_U8:
    7474            bytes = img->w * img->h * 4 * sizeof(uint8_t);
    7575            bpp = 4 * sizeof(uint8_t);
    7676            break;
    77         case PIPI_PIXELS_BGR_C:
     77        case PIPI_PIXELS_BGR_U8:
    7878            bytes = img->w * img->h * 3 * sizeof(uint8_t);
    7979            bpp = 3 * sizeof(uint8_t);
    8080            break;
    81         case PIPI_PIXELS_RGBA_F:
     81        case PIPI_PIXELS_RGBA_F32:
    8282            bytes = img->w * img->h * 4 * sizeof(float);
    8383            bpp = 4 * sizeof(float);
    8484            break;
    85         case PIPI_PIXELS_Y_F:
     85        case PIPI_PIXELS_Y_F32:
    8686            bytes = img->w * img->h * sizeof(float);
    8787            bpp = sizeof(float);
     
    9999
    100100    /* Convert pixels */
    101     if(img->last_modified == PIPI_PIXELS_RGBA_C
    102                   && type == PIPI_PIXELS_RGBA_F)
    103     {
    104         uint8_t *src = (uint8_t *)img->p[PIPI_PIXELS_RGBA_C].pixels;
     101    if(img->last_modified == PIPI_PIXELS_RGBA_U8
     102                  && type == PIPI_PIXELS_RGBA_F32)
     103    {
     104        uint8_t *src = (uint8_t *)img->p[PIPI_PIXELS_RGBA_U8].pixels;
    105105        float *dest = (float *)img->p[type].pixels;
    106106
     
    113113                        = u8tof32(src[4 * (y * img->w + x) + i]);
    114114    }
    115     else if(img->last_modified == PIPI_PIXELS_BGR_C
    116                        && type == PIPI_PIXELS_RGBA_F)
    117     {
    118         uint8_t *src = (uint8_t *)img->p[PIPI_PIXELS_BGR_C].pixels;
     115    else if(img->last_modified == PIPI_PIXELS_BGR_U8
     116                       && type == PIPI_PIXELS_RGBA_F32)
     117    {
     118        uint8_t *src = (uint8_t *)img->p[PIPI_PIXELS_BGR_U8].pixels;
    119119        float *dest = (float *)img->p[type].pixels;
    120120
     
    133133            }
    134134    }
    135     else if(img->last_modified == PIPI_PIXELS_RGBA_F
    136                        && type == PIPI_PIXELS_RGBA_C)
    137     {
    138         float *src = (float *)img->p[PIPI_PIXELS_RGBA_F].pixels;
     135    else if(img->last_modified == PIPI_PIXELS_RGBA_F32
     136                       && type == PIPI_PIXELS_RGBA_U8)
     137    {
     138        float *src = (float *)img->p[PIPI_PIXELS_RGBA_F32].pixels;
    139139        uint8_t *dest = (uint8_t *)img->p[type].pixels;
    140140
     
    169169                }
    170170    }
    171     else if(img->last_modified == PIPI_PIXELS_RGBA_F
    172                        && type == PIPI_PIXELS_BGR_C)
    173     {
    174         float *src = (float *)img->p[PIPI_PIXELS_RGBA_F].pixels;
     171    else if(img->last_modified == PIPI_PIXELS_RGBA_F32
     172                       && type == PIPI_PIXELS_BGR_U8)
     173    {
     174        float *src = (float *)img->p[PIPI_PIXELS_RGBA_F32].pixels;
    175175        uint8_t *dest = (uint8_t *)img->p[type].pixels;
    176176
     
    205205                }
    206206    }
    207     else if(img->last_modified == PIPI_PIXELS_Y_F
    208                        && type == PIPI_PIXELS_RGBA_F)
    209     {
    210         float *src = (float *)img->p[PIPI_PIXELS_Y_F].pixels;
    211         float *dest = (float *)img->p[PIPI_PIXELS_RGBA_F].pixels;
     207    else if(img->last_modified == PIPI_PIXELS_Y_F32
     208                       && type == PIPI_PIXELS_RGBA_F32)
     209    {
     210        float *src = (float *)img->p[PIPI_PIXELS_Y_F32].pixels;
     211        float *dest = (float *)img->p[PIPI_PIXELS_RGBA_F32].pixels;
    212212
    213213        init_tables();
     
    223223            }
    224224    }
    225     else if(img->last_modified == PIPI_PIXELS_RGBA_F
    226                        && type == PIPI_PIXELS_Y_F)
    227     {
    228         float *src = (float *)img->p[PIPI_PIXELS_RGBA_F].pixels;
    229         float *dest = (float *)img->p[PIPI_PIXELS_Y_F].pixels;
     225    else if(img->last_modified == PIPI_PIXELS_RGBA_F32
     226                       && type == PIPI_PIXELS_Y_F32)
     227    {
     228        float *src = (float *)img->p[PIPI_PIXELS_RGBA_F32].pixels;
     229        float *dest = (float *)img->p[PIPI_PIXELS_Y_F32].pixels;
    230230
    231231        init_tables();
  • libpipi/trunk/pipi/quantize/reduce.c

    r3340 r3342  
    379379    debug("");
    380380
    381     srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     381    srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    382382    srcdata = (float *)srcp->pixels;
    383383
     
    386386
    387387    dst = pipi_new(w, h);
    388     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     388    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    389389    dstdata = (float *)dstp->pixels;
    390390
  • libpipi/trunk/pipi/render/noise.c

    r3340 r3342  
    3535
    3636    ret = pipi_new(w, h);
    37     pix = pipi_get_pixels(ret, PIPI_PIXELS_RGBA_F);
     37    pix = pipi_get_pixels(ret, PIPI_PIXELS_RGBA_F32);
    3838    data = (float *)pix->pixels;
    3939
  • libpipi/trunk/pipi/render/screen.c

    r3340 r3342  
    4545
    4646    ret = pipi_new(w, h);
    47     pix = pipi_get_pixels(ret, PIPI_PIXELS_Y_F);
     47    pix = pipi_get_pixels(ret, PIPI_PIXELS_Y_F32);
    4848    data = (float *)pix->pixels;
    4949
     
    108108
    109109    ret = pipi_new(w * 2, h * 2);
    110     pix = pipi_get_pixels(ret, PIPI_PIXELS_Y_F);
     110    pix = pipi_get_pixels(ret, PIPI_PIXELS_Y_F32);
    111111    data = (float *)pix->pixels;
    112112
  • libpipi/trunk/pipi/resize.c

    r3340 r3342  
    3232    int x, y, x0, y0, sw, dw, sh, dh, remy;
    3333
    34     srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F);
     34    srcp = pipi_get_pixels(src, PIPI_PIXELS_RGBA_F32);
    3535    srcdata = (float *)srcp->pixels;
    3636
    3737    dst = pipi_new(w, h);
    38     dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F);
     38    dstp = pipi_get_pixels(dst, PIPI_PIXELS_RGBA_F32);
    3939    dstdata = (float *)dstp->pixels;
    4040
  • libpipi/trunk/pipi/stock.c

    r3340 r3342  
    174174
    175175        ret = pipi_new(w, h);
    176         pix = pipi_get_pixels(ret, PIPI_PIXELS_Y_F);
     176        pix = pipi_get_pixels(ret, PIPI_PIXELS_Y_F32);
    177177        memcpy(pix->pixels, ker, w * h * sizeof(float));
    178178
  • libpipi/trunk/pipi/tiles.c

    r3341 r3342  
    8888    switch(fmt)
    8989    {
    90         case PIPI_PIXELS_RGBA_C:
    91         case PIPI_PIXELS_BGR_C:
     90        case PIPI_PIXELS_RGBA_U8:
     91        case PIPI_PIXELS_BGR_U8:
    9292            bytes = sizeof(uint8_t) * TILE_SIZE * TILE_SIZE;
    9393            break;
    94         case PIPI_PIXELS_RGBA_F:
    95         case PIPI_PIXELS_Y_F:
     94        case PIPI_PIXELS_RGBA_F32:
     95        case PIPI_PIXELS_Y_F32:
    9696            bytes = sizeof(float) * TILE_SIZE * TILE_SIZE;
    9797            break;
  • libpipi/trunk/test/u8tof32tou8.c

    r3340 r3342  
    3535    img2 = pipi_load("mona.png");
    3636
    37     pix1 = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_C);
     37    pix1 = pipi_get_pixels(img1, PIPI_PIXELS_RGBA_U8);
    3838    data1 = (uint32_t *)pix1->pixels;
    3939
    40     pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F);
    41     pix2 = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_C);
     40    pipi_get_pixels(img2, PIPI_PIXELS_RGBA_F32);
     41    pix2 = pipi_get_pixels(img2, PIPI_PIXELS_RGBA_U8);
    4242    data2 = (uint32_t *)pix2->pixels;
    4343
Note: See TracChangeset for help on using the changeset viewer.