REALBuildPictureFromPictureDescription and CGBitmapContext?


does one of you know details of REALBuildPictureFromPictureDescription?

	REALpictureDescription des = {0};
	des.pictureType = pictureCGBitmapContext;
	des.pictureData = me->handle;
	des.width = CGBitmapContextGetWidth(me->handle);
	des.height = CGBitmapContextGetHeight(me->handle);
	des.depth = 32;
	des.transparent = 0;
	result = REALBuildPictureFromPictureDescription(&des, bPassOwnership);

I tried to use it to turn CGBitmapContextRef into Picture object, but that fails here.

REALBuildPictureFromPictureDescription is only implemented for pictureMacintoshPICT, pictureMacintoshCICN, pictureMacintoshIconSuite, and pictureMacintoshGWorld. All of these types are specific to the Carbon framework.

Thanks for the answer. So no way to create Picture from CGBitmapContextRef?

No, not directly.

So I created a case #29723.