• 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: Swapping NSBitmapImageRep bitmapData's
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Swapping NSBitmapImageRep bitmapData's


  • Subject: Re: Swapping NSBitmapImageRep bitmapData's
  • From: Ken Tabb <email@hidden>
  • Date: Mon, 11 Jun 2001 18:22:12 +0100

And so it was that Stiphane Sudre said on 11/6/01 6:07 pm:

>
>On lundi, juin 11, 2001, at 05:47 PM, Ken Tabb wrote:
>
>> Hi,
>> is there any way to swap the bitmapData array in an NSBitmapImageRep? I
>> have some image processing code in which I would like to swap the array
>> being pointed to by the NSBitmapImageRep. The 2 arrays are of the same
>> length / pixel order / depth etc., just showing a different picture.
>>
>> Is this possible... the API docs only seem to suggest ways of getting an
>> NSBitmapImageRep's bitmapData, rather than setting it.
>
>Stupid suggestion:
>
>Get the bitmap data of the NSBitmapImageRep and then copy the new array
>into it and redisplay the NSBitmapImageRep (since they share the same
>dimension, depth and others).
>
>Keep a copy of the old current array in case you want to swap again.

Thanks for the suggestion, but I was aiming to prevent the need for
copying the whole array. Some of my image processing requires a source
bitmap (array) and a destination bitmap (array). If I could change which
array the NSBitmapImageRep is pointing to then it's a lot faster than
copying the whole thing each time (there's a lot of image processing
going on, resulting in about 10 swaps per image).

So does anyone reckon this is possible?

Thanks in advance,
Ken



---------
Ken Tabb.
Mac & UNIX C/C++/Java developer (Health & Human Sciences),
Machine Vision researcher/programmer (Computer Science),
University of Hertfordshire, England
http://www.health.herts.ac.uk/ken/

Certified non-Microsoft Solution Provider


  • Prev by Date: Re: Swapping NSBitmapImageRep bitmapData's
  • Next by Date: Re: Copy and Paste of rows in a NSTableView
  • Previous by thread: Re: Swapping NSBitmapImageRep bitmapData's
  • Next by thread: Re: Swapping NSBitmapImageRep bitmapData's
  • Index(es):
    • Date
    • Thread