[MonoTouch] CGImageSource from file
Jason Awbrey
jason at awbrey.net
Fri Mar 2 13:34:31 UTC 2012
excellent, thanks!
On Fri, Mar 2, 2012 at 6:10 AM, Rolf Bjarne Kvinge <rolf at xamarin.com> wrote:
> Hi Jason,
>
> You found a bug in MonoTouch (
> https://bugzilla.xamarin.com/show_bug.cgi?id=3717).
>
> You can quite easily work around it by passing a CGImageOptions:
>
> CGImageSource.FromData (data, new CGImageSourceOptions ());
>
> I hope this helps,
> Rolf
>
> On Fri, Mar 2, 2012 at 4:03 AM, Jason Awbrey <jason at awbrey.net> wrote:
>
>> incidentally, I'm running MD 2.8.6.5, MT 5.2.5, Mono 2.10.9 on the latest
>> Lion release with the latest stable iOS SDK
>>
>>
>> On Thu, Mar 1, 2012 at 6:09 PM, Jason Awbrey <jason at awbrey.net> wrote:
>>
>>> attached
>>>
>>> I also tried with some smaller images and a png, same result
>>>
>>>
>>> On Thu, Mar 1, 2012 at 6:02 PM, Rolf Bjarne Kvinge <rolf at xamarin.com>wrote:
>>>
>>>> Hi,
>>>>
>>>> On Fri, Mar 2, 2012 at 1:00 AM, Jason Awbrey <jason at awbrey.net> wrote:
>>>>
>>>>> no, that fails also
>>>>>
>>>>> I can find almost no references online to working with CGImageSource
>>>>> under MT, so I'm curious if this is a bug that has never been uncovered?
>>>>>
>>>>
>>>> This is possible.
>>>>
>>>>
>>>>> Can someone else try and see if they can replicate (or disprove) it?
>>>>>
>>>>
>>>> Do you have a test project you can share? That would be a bit simpler
>>>> for those of us who might want to try it out :)
>>>>
>>>> Thanks
>>>> Rolf
>>>>
>>>>
>>>>
>>>>>
>>>>> On Thu, Mar 1, 2012 at 5:31 PM, Rolf Bjarne Kvinge <rolf at xamarin.com>wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Does something like this work?
>>>>>>
>>>>>> CGImageSource source = CGImageSource.FromUrl (NSUrl.FromFilename
>>>>>> ("image.jpg"));
>>>>>>
>>>>>> Rolf
>>>>>>
>>>>>> On Thu, Mar 1, 2012 at 6:56 PM, Jason Awbrey <jason at awbrey.net>wrote:
>>>>>>
>>>>>>> I need to create a CGImageSource from a file. Seems simple, but is
>>>>>>> driving me nuts
>>>>>>>
>>>>>>> // this works, I get a data object with the correct length
>>>>>>> NSData data = NSDate.FromFile("image.jpg");
>>>>>>>
>>>>>>> // this returns a null object
>>>>>>> CGImageSource source = CGImageSource.FromData(data);
>>>>>>>
>>>>>>>
>>>>>>> What am I doing wrong?
>>>>>>>
>>>>>>> thanks - Jason1
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> MonoTouch mailing list
>>>>>>> MonoTouch at lists.ximian.com
>>>>>>> http://lists.ximian.com/mailman/listinfo/monotouch
>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/monotouch/attachments/20120302/000d4ecc/attachment-0001.html>
More information about the MonoTouch
mailing list