Maybe one day it will be possible for us to bring in images from the user's desktop computer photo application or from their web camera, but for now, these features only work on mobile devices.
LiveCode can call upon the native photo library and camera apps. We will test both of these on Android and iOS, but of course, only if your device has some saved images and a camera. For Kindle Fire, which doesn't have a camera, make sure that you save some pictures in the Gallery app, so that we can at least try loading those. Follow these steps to load pictures for a mobile device:
DatePicker
card and paste it twice on the Pictures card. Change the name of the buttons to Test Camera and Test Library.on mouseUp mobilePickPhoto "camera" end mouseUp
on mouseUp mobilePickPhoto "library" end mouseUp
on mouseUp if word 1 of the target is "image" then delete the target end mouseUp
These simple scripts illustrate how LiveCode is able to call the OS-specific applications to do what would otherwise take a lot of coding. What's more, as later iOS and Android OS versions are released, the same simple scripts activate the more advanced features that Apple and Google will have implemented.
Q1. We take so much for granted when it comes to improvements in technology. You might feel hard done by if your phone's camera is a measly 2 megapixels, but think back to how things were long ago and how big a picture you were used to seeing. In terms of the number of pixels, how many original Macintosh screens can fit in the area shown by a single 8 megapixel photo?
Answer: 45!
The original Mac had a screen that was 512 x 342 pixels. This will fit more than 45 times in the area of an 8 megapixel photo.