• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: vImage
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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>)

  • Prev by Date: Re: Setting a documents file type during save as=8 5
  • Next by Date: Re: CURLHandle trouble
  • Previous by thread: Re: vImage
  • Next by thread: Special keystrokes recording
  • Index(es):
    • Date
    • Thread