vImage
vImage
- Subject: vImage
- From: Amedeo Paglione <email@hidden>
- Date: Sat, 10 Jan 2004 01:01:21 +0100
Hi all,
I'm trying to use the vImage library to resize an image but I always
get an exception executing the vImageScale_ARGB8888 function.
Here is an extract from the simple test code:
NSBitmapImageRep * theImage = [ NSBitmapImageRep
imageRepWithContentsOfFile:filename ];
if( theImage != nil )
{
src = (vImage_Buffer*)malloc(sizeof(vImage_Buffer));
bpp = [ theImage bitsPerPixel]/8;
MyInitBuffer(src, [theImage pixelsHigh], [theImage pixelsWide], bpp);
bytesPRow = [theImage bytesPerRow];
h = [theImage pixelsHigh];
memcpy(src->data, [theImage bitmapData], h * bytesPRow);
dest = (vImage_Buffer*)malloc(sizeof(vImage_Buffer));
MyInitBuffer(dest, 300, 300, bpp );
vImageScale_ARGB8888(src, dest, NULL, 0); // Here it is the ERROR
MyFreeBuffer(dest);
MyFreeBuffer(src);
}
MyInitBuffer() and MyFreeBuffer() are functions taken by the vImage
document
http://developer.apple.com/documentation/Performance/Conceptual/vImage/
vImage.pdf
Other than vImage are there alternative way to resize an image?
Thanks,
Amedeo
_______________________________________________
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.