Works on Windows and Mac simulators but not on the device.

I wrote a program that loads a picture and then allows you to select an oval shaped part of it and then cut it, store that cut in the device and then you can use it in a game. It works by applying a mask over the picture and allowing the user to modifiy the mask’s position, rotation and scales. When you tap the button “cut” the program saves that image with the mask applied and saves the mask properties at that time too. Later, if you choose that cut from the “faces” selection screen (cuts are meant to be faces) you go to an object throwing game where you throw that face (the program loads the saved image and applies a mask with the saved properties).

Problem is that this works perfectly fine on Windows and Mac simulators, but when testing on device I get odd results. When I go to the faces selection screen the cuts look awful, showing just a tiny part of the masked image and the rest just black. My device is an iPod 4 and i’ve been testing with the simulator in iPhone 4 mode so it should work fine and it’s not. This seems to be a bug… or am I doing something wrong? [import]uid: 100141 topic_id: 16964 reply_id: 316964[/import]

What settings do you have in your config.lua file?

[import]uid: 67839 topic_id: 16964 reply_id: 63654[/import]

You might be saving your new images to the system.ResourceDirectory if so you need the save them to the system.DocumentsDirectory.

You can not modify files in the system.ResourceDirectory on a device.

-Darkmod

[import]uid: 7177 topic_id: 16964 reply_id: 63702[/import]

This is my config.lua:

[lua]application =
{
content =
{
width = 320,
height = 480,
scale = “Letterbox”,
fps = 30,
antialias = true,

imageSuffix =
{
["@2x"] = 2,
},
},
}[/lua]

And I am saving the files to system.DocumentsDirectory [import]uid: 100141 topic_id: 16964 reply_id: 63846[/import]

I had this problem once too, did you do your pictures in PhotoShop? [import]uid: 86879 topic_id: 16964 reply_id: 63872[/import]

I had this problem once too, did you do your pictures in PhotoShop? [import]uid: 86879 topic_id: 16964 reply_id: 63873[/import]

No, the pictures to cut are facebook profile pictures. I used downloaded pictures to test on the simulator and it worked fine. On the device, the program downloads your friend’s profile pictures and then allows you to choose one, then you can cut a part of it. Everything works fine until you do the cut (it goes entirely or almost entirely black). [import]uid: 100141 topic_id: 16964 reply_id: 63885[/import]