Ignore:
Timestamp:
Aug 26, 2008, 1:39:15 AM (12 years ago)
Author:
Sam Hocevar
Message:
  • pipi.h: add the PIPI_PIXELS_MASK_C pixel format for canvas boundaries.
  • pipi.h: rename RGBA32 and BGR24 into RGBA_C and BGR_C.
File:
1 edited

Legend:

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

    r2756 r2772  
    4242    img = pipi_new(priv->width, priv->height);
    4343
    44     img->p[PIPI_PIXELS_BGR24].pixels = priv->imageData;
    45     img->p[PIPI_PIXELS_BGR24].w = priv->width;
    46     img->p[PIPI_PIXELS_BGR24].h = priv->height;
    47     img->p[PIPI_PIXELS_BGR24].pitch = priv->widthStep;
    48     img->p[PIPI_PIXELS_BGR24].bpp = 24;
    49     img->p[PIPI_PIXELS_BGR24].bytes = 3 * img->w * img->h;
    50     img->last_modified = PIPI_PIXELS_BGR24;
     44    img->p[PIPI_PIXELS_BGR_C].pixels = priv->imageData;
     45    img->p[PIPI_PIXELS_BGR_C].w = priv->width;
     46    img->p[PIPI_PIXELS_BGR_C].h = priv->height;
     47    img->p[PIPI_PIXELS_BGR_C].pitch = priv->widthStep;
     48    img->p[PIPI_PIXELS_BGR_C].bpp = 24;
     49    img->p[PIPI_PIXELS_BGR_C].bytes = 3 * img->w * img->h;
     50    img->last_modified = PIPI_PIXELS_BGR_C;
    5151
    5252    img->codec_priv = (void *)priv;
    53     img->codec_format = PIPI_PIXELS_BGR24;
     53    img->codec_format = PIPI_PIXELS_BGR_C;
    5454
    5555    img->wrap = 0;
     
    7474
    7575        /* FIXME: check pitch differences here */
    76         if(img->last_modified == PIPI_PIXELS_BGR24)
     76        if(img->last_modified == PIPI_PIXELS_BGR_C)
    7777        {
    78             memcpy(priv->imageData, img->p[PIPI_PIXELS_BGR24].pixels,
     78            memcpy(priv->imageData, img->p[PIPI_PIXELS_BGR_C].pixels,
    7979                   3 * img->w * img->h);
    80             free(img->p[PIPI_PIXELS_BGR24].pixels);
     80            free(img->p[PIPI_PIXELS_BGR_C].pixels);
    8181        }
    8282
    83         img->p[PIPI_PIXELS_BGR24].pixels = priv->imageData;
    84         img->p[PIPI_PIXELS_BGR24].w = priv->width;
    85         img->p[PIPI_PIXELS_BGR24].h = priv->height;
    86         img->p[PIPI_PIXELS_BGR24].pitch = priv->widthStep;
    87         img->p[PIPI_PIXELS_BGR24].bpp = 24;
    88         img->p[PIPI_PIXELS_BGR24].bytes = 3 * img->w * img->h;
     83        img->p[PIPI_PIXELS_BGR_C].pixels = priv->imageData;
     84        img->p[PIPI_PIXELS_BGR_C].w = priv->width;
     85        img->p[PIPI_PIXELS_BGR_C].h = priv->height;
     86        img->p[PIPI_PIXELS_BGR_C].pitch = priv->widthStep;
     87        img->p[PIPI_PIXELS_BGR_C].bpp = 24;
     88        img->p[PIPI_PIXELS_BGR_C].bytes = 3 * img->w * img->h;
    8989
    9090        img->codec_priv = (void *)priv;
    91         img->codec_format = PIPI_PIXELS_BGR24;
     91        img->codec_format = PIPI_PIXELS_BGR_C;
    9292
    9393        img->wrap = 0;
Note: See TracChangeset for help on using the changeset viewer.