Re: vImage
Re: vImage
- Subject: Re: vImage
- From: Amedeo Paglione <email@hidden>
- Date: Tue, 13 Jan 2004 22:59:27 +0100
On 12 Jan 2004, at 22:34, John Randolph wrote:
Better make that:
vbuf->height = [imageRep pixelsHigh];
vbuf->width = [imageRep pixelsWide];
The size of an imageRep doesn't necessarily match its pixel dimensions.
Thanks for the tip. Unfortunately I still got the exception as the
vImageScale_ARGB8888 is called. Follows an extraction of the used code.
Amedeo
------------------------------------------------------
src = (vImage_Buffer*)malloc(sizeof(vImage_Buffer));
bpp = [ imageRep bitsPerPixel]/8;
src->height = [imageRep pixelsHigh];
src->width = [imageRep pixelsWide];
src->rowBytes = [imageRep bytesPerRow];
src->data = [imageRep bitmapData];
dest = (vImage_Buffer*)malloc(sizeof(vImage_Buffer));
dest->height = 300;
dest->width = 300;
dest->rowBytes = dest->width * bpp;
dest->data = malloc( dest->rowBytes * dest->height );
vImageScale_ARGB8888(src, dest, NULL, 0);
------------------------------------------------------------------------
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >vImage (From: Amedeo Paglione <email@hidden>) |
| >Re: vImage (From: Shawn Erickson <email@hidden>) |
| >Re: vImage (From: Amedeo Paglione <email@hidden>) |
| >Re: vImage (From: Shawn Erickson <email@hidden>) |
| >Re: vImage (From: John Randolph <email@hidden>) |