[futurebasic] Re: [FB] Image not showing in HIImageView

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : January 2012 : Group Archive : Group : All Groups

From: Brian S <fblistserve@...>
Date: Sat, 28 Jan 2012 09:41:50 -0700
On Jan 27, 2012, at 11:48 PM, Robert Purves wrote:

> Just a reminder that there's a better way to create a CGImage from a file.
Thanks Robert. Like usual, there are several approaches. Noticed it is also possible to use:

dim as HIViewContentInfo  hivcontent
dim as CFURLRef           fileUrl

fileUrl = fn CFBundleCopyResourceURL( fn CFBundleGetMainBundle(), @"some.jpg", 0, 0 )
hivcontent.contentType = _kHIViewContentImageFile
hivcontent.u.imageFile = fileUrl
err = fn HIViewSetImageContent( imageView, _kHIViewEntireView, hivcontent )

this would be after creating an empty image view with: fn HIImageViewCreate ( NULL, imageView )

Thanks to RC for his comments too.
Brian S