Any ideas why img.AsPng doesn't work then? I use img.AsJpeg a lot, and
it's been working fine.

Memory issue maybe? Can you round-trip the image? ie load it, save it
to a NSData (as png). Load it from the NSData, show it?



On Wed, Apr 18, 2012 at 16:29, chris.s <[email protected]> wrote:
> OK, a bit more digging and I think the problem actually might be with this
> bit of code...
>
> NSData data = img.AsPng();
>
> Inspecting 'data' after this statement, it shows as being 'null', tho it's
> Length property is set to a value.
>
> Tweaking the code to ...
>
> NSData data = NSData.FromString("Bob Says Hello")
>
> ... and the insert works.
>
> img.SaveToPhotosAlbum() works as expected, so img definitely has a valid
> image.
>
> I'd really rather not save the file to disk, the images are sent back to a
> central server and removed from the device. I already have database synching
> working and this would take care of it all without further changes.
>
> Any more ideas?
>
> Chris
>
> PS ExecuteScalar and ExecuteNonQuery both work fine.
>
>
> --
> View this message in context: 
> http://monotouch.2284126.n4.nabble.com/Inserting-image-into-SQLite-tp4565016p4568057.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch



-- 
Nic Wise
t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/

Earnest: Self-employed? Track your business expenses and income.
http://earnestapp.com
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to