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

Change _C pixel format suffixes into _U8 for more clarity.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.