Pierre-Yves Aquilanti wrote:

NSData * binaryData=[NSData dataWithContentsOfFile:binaryPath]; // binary is
just a 32bits array full of 1500. and 3000. as described previously


Does the endian-ness of the floats in the file match the endian-ness of the processor the code is running on?

Also, in the NSCalibratedWhiteColorSpace, white is 1.0, black is 0.0, and grays all lie in the normalized range 0.0 thru 1.0. So 1500 and 3000 are "whiter than white" and will undoubtedly be truncated to white (1.0).

It's unclear to me what the "white" value is in your 1500 and 3000 values, but if 3000 is white, then you need to divide your raw data by 3000 to get it into normalized range.

  -- GG

_______________________________________________

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]

Reply via email to