Hi, i have some trouble with some Core funtions and are out of ideas (after a whole day of searching, debugging and docs-reading)
The problem could be simple described:
I have 2 CGImageRef 'objects' which i have to compare.
That is working fine with the CFEqual function.
But i also need a valid (valid per contract) HashCode too.
The problem is now that these hashcodes are _always_ 0
To make this more visual i have appended a little code snipped below.
Because i really have any further ideas i need some help with this.
Much thanks in advance.
Stefan
/* SNIP */
(Yes, CoreFoundation.h is included)
CGImageRef imageRefOne;
CGImageRef imageRefTwo;
CFDataRef imageRefTwoDataRef; /* ... */
/.../
CGDataProviderRef dprov = CGImageGetDataProvider( imageRefOne );
CFDataRef imageRefOneDataRef = CGDataProviderCopyData( dprov );
/*
imageRefOneDataRef and the 2 CGImageRef's are ok, checked in XCode
debugger.
could be copied into an NSBitmapImageRep object and looks as expected
*/
CFHashCode hcOne = CFHash(imageRefOneDataRef); /* Returns ALWAYS 0 */
CFHashCode hcTwo = CFHash(imageRefTwoDataRef); /* Returns ALWAYS 0 */
BOOL isEqual = CFEqual(imageRefOneDataRef, imageRefTwoDataRef);
/* Works ALWAYS as expected: if images are equal it returns equal. if
not: not*/
/* SNIP */
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
