How to use photoshop touch to add transparency for a sprite?

I have made a small drawing in a app and saved it to camera roll.
I import it from camera roll into photoshop touch, using the magic wand to remove the white area around and make it transparent.
When I add the drawing in codea it is still some area around that covering other items.
The same is happening if I import it from camera roll or from Dropbox.

Picture after photoshop, retina:
Picture after photoshop, non-retina:
Picture before photoshop:
The problem:

It seems you have not removed all the white pixels with photoshop. Personally i do this to solve the problem of transparency

    local img = image(252,200)
    local r,g,b
    local transp = color(0, 0, 0, 0) 
    for x=1,img.width do for y=1,img.height do
        r,g,b = img:get(x,y)
        if r>200 and g>200 and b>200 then img:set(x,y,transp) end
    end end

img has now the required transparency. Adapt img size to your own needs. And Sprite your own image. This is done once so the time it takes does not mind.

Problem resolved.
The problem was the sprite() that was in wrong order.