Re: vImage
Re: vImage
- Subject: Re: vImage
- From: Amedeo Paglione <email@hidden>
- Date: Sat, 10 Jan 2004 15:46:07 +0100
On 10 Jan 2004, at 01:42, Shawn Erickson wrote:
Why the copy? You should just be able to get the pointer to image data
and wrap that data with a vImage_Buffer.
You are right, it is not necessary, but I used it in order to take
advantage of the MyInitBuffer with the source and dest vImage_Buffer.
Anyway I believe you need to specify something for the flags field,
zero is not a valid option for this operation. The docs list the
following...
kvImageBackgroundColorFill
If set, the function will use the Background Color Fill technique to
access pixels outside the source image.
...
Actually, I tried some of them but still it did not work.
I cannot locate the message now but I believe an Apple employee just
emailed a code snippet that outlined how to resize an image in Cocoa
without resolution loss.
I found some samples
(
http://developer.apple.com/samplecode/Sample_Code/Cocoa/
FunkyOverlayWindow/DragMatrix.m.htm ) not related to the vImage that
scale images using the NSImage and setSize: method. But if I use then
the:
[theImage setScalesWhenResized:YES];
[theImage setSize:NSMakeSize(30,30)];
NSBitmapImageRep * theNewImage = [[NSBitmapImageRep alloc]
initWith
Data:[theImage TIFFRepresentation]];
the new image keeps the original image size.
Anyway, I really would like to use the vImage library, which seems to
give a more powerful approach to image processing.
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.
References: | |
| >vImage (From: Amedeo Paglione <email@hidden>) |
| >Re: vImage (From: Shawn Erickson <email@hidden>) |