Import image from mobile library to Graphic

Moderators: LCNeil, heatherlaine, kevinmiller, elanorb

Post Reply
marcelloe
Posts: 140
Joined: Thu Oct 17, 2013 2:26 pm

Import image from mobile library to Graphic

Post by marcelloe » Tue Dec 03, 2013 3:48 pm

I want to import images from my mobile library into my doodleArea (Graphic) to draw on. Then I want to be able to save the image to the mobile library. How would I go about doing that.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Import image from mobile library to Graphic

Post by LCNeil » Tue Dec 03, 2013 7:59 pm

Hi Mark,

Please see the attached stack that shows how to import an image from a mobile gallery, draw on it and then export this back to the mobile gallery. It also allows you to test import the image back to a new graphic in order to test the export.

Kind Regards,

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--
Attachments
Mark Draw Import Image.livecode.zip
(3.13 KiB) Downloaded 207 times

marcelloe
Posts: 140
Joined: Thu Oct 17, 2013 2:26 pm

Re: Import image from mobile library to Graphic

Post by marcelloe » Tue Dec 03, 2013 8:33 pm

The only issue I am having now is the following.

1. Once the image is imported from the library. The image can't be drawn on.
2. I can't delete the image once it is in the drawing area.

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: Import image from mobile library to Graphic

Post by LCNeil » Tue Dec 03, 2013 9:21 pm

Hi Mark,

I added the following script to the clear button to delete any images on the stack-

Code: Select all

   if there is an image 1 then
      repeat with x = 1 to the number of images of this card
         delete image 1
      end repeat
   end if
   
and in regards to not being able to draw on the image, I cannot seem to replicate this issue. Please see the video I created that shows drawing and exporting an imported image on iOS

http://techsupport.on-rev.com/mark.mp4.zip

Is this not the behaviour you experience?

Kind Regards

Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
LiveCode – Realize fast, compile-free coding

--

Post Reply

Return to “idea2app and Coding School”