If I import an image into Codea by copying it directly into the Codea directory via share…Files on the iPad, it shows in the asset picker but doesn’t render to screen as a sprite. If I add a second sprite, but this time use the +Photo option in the asset picker, select the photo and name it something different then run, then both the new and original render as the same image. If I comment out the second instance then the first turns black.
Is anyone else seeing this?
Steps to recreate:
- Take 2 photos with the iPad
- In photo the photo browser select the share button, select both photos and Save to files. Save them to “On my iPad…Codea”
- Launch Codea and start a new project
- Type Sprite() in draw() and tap the braces to load the asset picker. The newly saved photos should be there. Select one and “use”. You may get the NSRange bug - delete the text and replace it with 200,200,200,200 to set the image to a bottom left location sized to 200 by 200
- Run - the sprite renders as a black square
- Repeat 4 & 5 for the second photo - this time placing it at 500,200,200,200
- Run again - both sprites render as black squares
- Type Sprite() in draw() for a third time and tap the braces to load the asset picker. This time tap +Photo and select the first photo from the photo library. Set size and location to 200,500,200,200. Give it a brand new name
- Run - all three sprites now render as this most recent image
- Repeat 8 but load the second image into 500,500,200,200 giving it a different name
- Run - three older images render as the first image, the new one renders as it should do.
- Comment out the third sprite (from step 8) and run - all 3 images render as the last selected image now
- Now additionally comment out the fourth sprite (from step 8) - run - the first two sprites now render black
For context, what I am looking to do is bulk transfer quite a few images across to the directory then iterate through them - going through the +Photo route will be long and laborious!