Importing pics from Dropbox

I am trying to import pics from Dropbox. Their format is .png and when I sync them, they come up as 0 by 0 and whenever I try to use them, the app crashes. Any help?!

I presume you’ve tested they open properly on a mac or PC, or in Dropbox

Can you post a Dropbox link to one of them?

The items won’t work…
Help?
What should I do?

Post the Dropbox links to them.

They should be in Dropbox/Apps/Codea/filename.png

The Dropbox works fine for me, but I can’t resize them? Should I just get an app capable of resizing them for me?

@Wallisch_plus - you can resize them in Codea when you draw them, if that’s what you want

@tyguy2 can you post some images that are failing to work in Dropbox?

@Wallisch_pls you can render them in Codea at any size you want, for example:

-- Render 500 pixels wide
sprite( "Dropbox:MyImage", WIDTH/2, HEIGHT/2, 500 )

-- Render 1000 pixels wide
sprite( "Dropbox:MyImage", WIDTH/2, HEIGHT/2, 1000 )

You can also resize an image and re-save it like this (untested code, but should give the basic idea):

function resizeImage( img, width, height )
    local newImg = image(width,height)

    setContext(newImg)

    sprite( img, width/2, height/2, width, height )    

    setContext()

    return newImg
end

function setup()
    local imgToResize = readImage("Dropbox:MyImage")

    local imgResized = resizeImage( imgToResize, 600, 600 )

    saveImage( "Dropbox:MyImageResized", imgResized )
end

How does one post a picture?

Open the picture in Dropbox, then look for the icon that lets you copy the link (in the iPad app, it’s the right facing arrow, and then you select “Copy link to Clipboard”).

Post this link on the forum, to share your picture.

?

ok, I got it working

Now there is just a white background. How do I fix that?

FIXED IT! Never mind…