ios camera - using the image question

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Jamesplank
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Sat Jul 09, 2011 10:03 am

ios camera - using the image question

Post by Jamesplank » Fri May 11, 2012 4:59 am

H all and thanks in advance
Ive successfully gone through all the hoops apple
puts in front of us to get an app onto my Iphone.

Ive got LC 5.5 and Xcode 4.3.2
The code below takes a photo no problem BUT...
it always places it onto the card? Not into the image field??
I havent asked it to be placed there but there is where it goes.
has anyone got any idea whats going on
Thanks :-)))

James

on mouseUp

mobilePickPhoto "camera", 212, 122
if the result is text then
put the result into image "The_Image"
else
put the result into field "The_Result"
end if
end mouseUp

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ios camera - using the image question

Post by Klaus » Fri May 11, 2012 9:23 am

Hi James,

please check this thread:
http://forums.runrev.com/phpBB2/viewtop ... oto#p38784
Replace "Barry" with "James" :D

Best

Klaus

scotttyang
Posts: 125
Joined: Sat Jan 31, 2009 12:01 am

Re: ios camera - using the image question

Post by scotttyang » Sun May 13, 2012 6:01 pm

A follow up to this question.

What's the best way to crop the last image to a, eg. Square. I've used an image in a group that is Square looking, but would like to have the actual image cropped to a square.


Scott

Jamesplank
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 23
Joined: Sat Jul 09, 2011 10:03 am

Re: ios camera - using the image question

Post by Jamesplank » Mon May 14, 2012 4:55 am

Thanks Klaus
the code was copied from runrevs lesson
"How do I Capture Images in LiveCode Mobile?"
I guess its runrevs bad :wink:

James

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: ios camera - using the image question

Post by Jellicle » Mon May 14, 2012 8:37 am

scotttyang wrote:What's the best way to crop the last image to a, eg. Square. I've used an image in a group that is Square looking, but would like to have the actual image cropped to a square.

Check out the "import snapshot" command in the dictionary. You can do:

Code: Select all

import snapshot from rectangle 100,100,400,400
That creates a new image of the rectangle you specify and places it in the centre of the current card. As you know where the last image is (it defaults to the centre of the screen) you can provide a rect that crops it to the desired size.

Cheers

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: ios camera - using the image question

Post by Klaus » Mon May 14, 2012 3:08 pm

Hi James,
Jamesplank wrote:Thanks Klaus
the code was copied from runrevs lesson
"How do I Capture Images in LiveCode Mobile?"
I guess its runrevs bad :wink:
James
Oh, well, just took a look, yes, it is really part of that tutorial, unbelievable!? :shock:
What a shame...


Best

Klaus

Post Reply