Question about using display.newImage for arbitrary jpg files on macOS …
I know I used to know this…but…
how can I get display.newImage to open an arbitrary location .jpg file on macOS?
(I.e., a file specified by the user at run-time, not a file in my application directory.)
I’m building a solar2D app to run native on macOS.
I have found (or was told) a jpg filename (potentially anywhere on the filesystem of any drive), and I want to open/view it with display.newImage ().
But…it seems like native apps cannot do that.
Instead, the only jpg files I can open with display.newImage are those specified in my app build.
I can do: io.open (filename)
…so I know I have the filename (and path) correct, and that the OS security allows access to the file!
Note: I also tried copying the user-specified file to my app’s “document directory” (which happened to be /Users/sieler/Library/Application Support/Corona Simulator/test_walkdir-E35B97E460A38FA33A8E87FD4191A4CD/Documents), and then tried display.newImage, and it still failed.
Any suggestions, please?
thanks!