• 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
deserializeBytes question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

deserializeBytes question


  • Subject: deserializeBytes question
  • From: eblueBeta <email@hidden>
  • Date: Wed, 31 Oct 2001 15:56:48 -0500

hey,
got a problem understanding the implementation of the deserialize methods in the NSData and NSMutableData Objects.

I am actually trying to get the int values for each rgb pixel in a tiff image rep.
so I get the NSdata object for the tiffImageRep,

then I set my Cursor to the address of the pointer to the bytes of the Data Object, I am guessing that the counter needs to be that base address of the first element in the byte buffer.

now I send this command:

myInt = [MyDataObject deserializeAlignedBytesLengthAtCursor: cursor];

this gives me back an error:
2001-10-31 15:38:42.195 mitre[447] *** -[NSConcreteData deserializeAlignedBytesLengthAtCursor:]: range {1296891946, 4} exceeds data length 1399874

so my assumption at this point is that I don't understand deserializing.
the documentation of course is very spotty, so I don't know where to begin figuring this out.

any ideas what I am doing wrong?
i tried setting my cursor to 0, just incase the buffer counted from its first entry automatically, but i quickly realized it cannot be.
Then I realized that The method : deserializeAlignedBytesLengthAtCursor has no way of limiting the number of bytes it deserializes, and that makes me think I really don't understand what the method is for.

does anybody have any code that gets one pixel at a time from an NSData object that was passed from TiffRepresentation ?

any help would be greatly appreciated,
ted


  • Prev by Date: Re: Screensaver multiple monitor detect
  • Next by Date: What's up with MiscKit?
  • Previous by thread: Re: Framework warnings
  • Next by thread: What's up with MiscKit?
  • Index(es):
    • Date
    • Thread