osx - How can I get the *original* data behind an NSImage? -
I have an example of I would like to get the original data ( To be pedantic (since this is a problem which I have come), if Edit: I know that it is not strictly possible for all time for the I have yet to find a way to do this; Does anyone have any ideas? I agree with Ken, and there is a subset of the terms (I know that this is a GIF Reads from a file) Nothing changes. Unless you have but if you are incredibly lucky, then do this work Try: But how can you work, thinking that How can: There are the callbacks that will take you directly to the byte-pointers in internal data I strongly suspect that this is impossible. NSImage which I have been assigned by the API whose implementation is' T control
NSData ), to make that data without
NSImage Was converted into another representation / format (or otherwise "tampering") if the image was made from a file, then I would have to file a byte-by-byte with all the metadata and so on Amgri accurate, like. If the image was created with some arbitrarily
NSData example I is exact, byte-by-byte-equivalent copy of that
NSData
NSIZ was created from animated GIF, give me a
NSDT needs to be brought back which is actually the original animated GIF, unmolested.
NSImage s; How about the subset of images that were are definitely made from files and / or data?
NSImage , a lot of things have already happened with the data. Coco does not like to catch a bunch of data in memory, which is not needed directly if you do not have an original
CGImage (
NSImage ), You can actually be lucky and can find the data that you wanted in
CGDataProviderCopyData
list of representations with -imagererepresentations .
-CGImageForProposedRect: reference: hint < / Code>. You probably want a reset that matches the size of the image, and maybe I do not intercept.
CGImageGetDataProvider
CGDTetifier sender . (But I suspect that this will be the actual original data, including metadata, byte-to-byte.)
CGDataProvider (like
CGDataProviderGetBytePointerCallback ), but I do not know any way to request a list of callback from an existing
CGDataProvider . Usually, some quartz reaches, and we just pass during the creation.
Comments
Post a Comment