Weird composite fill error

(edit: my bad, somehow the 1_1.png file got saved in the wrong format but still with a .png extension. i’m leaving this post here just in case someone has the same issue, so double check you saved your image files correctly :wink:

Using build .2161, I’m not quite sure why I’m getting the following error on device but not in the simulator:

    ?:0: attempt to index field ‘fill’ (a string value)

    stack traceback:

The moment it goes to the   – cardImg.fill.effect = “composite.difference” – line i get the above error.

Based on the following code:

    local compositePaint = {type=“composite”,

           paint1={ type=“image”, filename=“1_1.png”},

           paint2={ type=“image”, filename=“m.png”}

    }

    local cardImg = display.newRoundedRect(0, 0, 256, 512,8 )

    cardImg.fill = compositePaint

    cardImg.fill.effect = “composite.difference”

I tried difference composite effects but all return a field ‘fill’ (a string value)???

I also tried with standard newRect instead of newRoundedRect but still get the same error.

Both images used to make the composite paint are 256x512 images.

Anyone run into the same issue?