*** Sorry for the double post ***

Am 18.06.2009 um 20:43 schrieb Stefan:

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;

/.../
        
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 */
        

BOOL isEqual = CFEqual(imageRefOne, imageRefTwo); /* Works ALWAYS as expected: if images are equal it returns equal. if not: not*/

/*  SNIP  */_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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/stefan%40wammel.com

This email sent to ste...@wammel.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to