Loading Images from system.directories

Hi all, trying to work out how to load an image that i’ve saved in my system.TemporaryDirectory

To clarify, i’m using this graphic in a widget button, so typically I just use a path for it… all attempts to do this through system.findPath etc just crashes my phone. The file does exist there cause I verify it, just no luck in actually loading anything from it. Anyone have any ideas? [import]uid: 168562 topic_id: 32765 reply_id: 332765[/import]

For a widget button, just specify ‘system.TemporaryDirectory’ as the baseDir parameter

local btn = widget.newButton{ default = "img.png", over = "img-over.png", baseDir = system.TemporaryDirectory } [import]uid: 14018 topic_id: 32765 reply_id: 130315[/import]

For a widget button, just specify ‘system.TemporaryDirectory’ as the baseDir parameter

local btn = widget.newButton{ default = "img.png", over = "img-over.png", baseDir = system.TemporaryDirectory } [import]uid: 14018 topic_id: 32765 reply_id: 130315[/import]

Oh thats great Mitaten! worked a treat… however, I do have a new problem lol, the picture isn’t scaling from the height/width parameters of the button =/

this is the code:

row.pictureBtn = widget.newButton { left = 62, top = 63, default = "ParkingImg.jpg", over = "ParkingImg.jpg", baseDir = system.TemporaryDirectory, width, height = 194, 211, onRelease = imgBtn } [import]uid: 168562 topic_id: 32765 reply_id: 130374[/import]

Oh thats great Mitaten! worked a treat… however, I do have a new problem lol, the picture isn’t scaling from the height/width parameters of the button =/

this is the code:

row.pictureBtn = widget.newButton { left = 62, top = 63, default = "ParkingImg.jpg", over = "ParkingImg.jpg", baseDir = system.TemporaryDirectory, width, height = 194, 211, onRelease = imgBtn } [import]uid: 168562 topic_id: 32765 reply_id: 130374[/import]

Think I have the problem resolved, did a re-assertion of the width and height after it was created, so far so good [import]uid: 168562 topic_id: 32765 reply_id: 130383[/import]

Think I have the problem resolved, did a re-assertion of the width and height after it was created, so far so good [import]uid: 168562 topic_id: 32765 reply_id: 130383[/import]