- Timestamp:
- Oct 19, 2008, 1:05:47 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libpipi/trunk/pipi/codec/coreimage.m
r3019 r3020 32 32 CIImage *source; 33 33 NSURL *url = [NSURL fileURLWithPath:n]; 34 34 35 source = [CIImage imageWithContentsOfURL:url]; 36 37 if(source == NULL) return NULL; 38 35 39 CGRect extent = [source extent]; 36 40 size_t w = (size_t)extent.size.width; … … 44 48 img = pipi_new(w, h); 45 49 img->p[PIPI_PIXELS_RGBA_C].pixels = [myImage bitmapData]; 46 img->p[PIPI_PIXELS_RGBA_C].w = w;47 img->p[PIPI_PIXELS_RGBA_C].h = h;48 img->p[PIPI_PIXELS_RGBA_C].pitch = ([myImage bytesPerRow]/8) * img->w;49 img->p[PIPI_PIXELS_RGBA_C].bpp = [myImage bitsPerPixel];50 img->p[PIPI_PIXELS_RGBA_C].bytes = ([myImage bitsPerPixel]/8) * img->w * img->h;51 img->last_modified = PIPI_PIXELS_RGBA_C;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; 52 56 53 57 img->codec_priv = (struct pipi_codec_coreimage *) malloc(sizeof(struct pipi_codec_coreimage *));
Note: See TracChangeset
for help on using the changeset viewer.