Getting small parts of a bigger image

Hi Guys,

I am developing a 15/8 puzzle game for all the platforms that Corona has to offer.
In my game I had to break pre added images and camera images and device photo library images into 8 or 15 pieces and then move on with the puzzle logic.I have made this game with a pre added image.Now I only want to use camera+library pics.But I am not able to find any solution.

Any help would be really appreciated.

Thanks. [import]uid: 139309 topic_id: 35131 reply_id: 335131[/import]

I think it’s possible with masks, but I think you’re going to find it very difficult to work with. I started out that way and was having trouble figuring out how to position the pieces when I spread them out since they all have the same center point.

[import]uid: 199310 topic_id: 35131 reply_id: 139663[/import]

Thanks Rob,

I managed to get different pieces of a single image by using the sprite sheets in Corona.I am able to get different pieces of different lengths and i am also able to store them as new images. but now i ran into another problem and it is that this thing works only with pre added pics but not with user pics(library +camera).because the function uses the name of the pics e.g “pic.png” as argument and it returns me the desired pieces. but with the camera pics i am not able to get the pic name.

Any help would be appreciated.
[import]uid: 139309 topic_id: 35131 reply_id: 139711[/import]

It works because your sprite sheet has multiple images and the image name is used to identify which piece of the sheet you want to access. There is corona code that goes with the sprite sheet that names the various chunks.

Photos from the camera or library are not sprite sheets. There is not a block of code. You cannot do what you are wanting to do with dynamic images from the camera roll.

[import]uid: 199310 topic_id: 35131 reply_id: 139806[/import]

I think it’s possible with masks, but I think you’re going to find it very difficult to work with. I started out that way and was having trouble figuring out how to position the pieces when I spread them out since they all have the same center point.

[import]uid: 199310 topic_id: 35131 reply_id: 139663[/import]

Thanks Rob,

I managed to get different pieces of a single image by using the sprite sheets in Corona.I am able to get different pieces of different lengths and i am also able to store them as new images. but now i ran into another problem and it is that this thing works only with pre added pics but not with user pics(library +camera).because the function uses the name of the pics e.g “pic.png” as argument and it returns me the desired pieces. but with the camera pics i am not able to get the pic name.

Any help would be appreciated.
[import]uid: 139309 topic_id: 35131 reply_id: 139711[/import]

It works because your sprite sheet has multiple images and the image name is used to identify which piece of the sheet you want to access. There is corona code that goes with the sprite sheet that names the various chunks.

Photos from the camera or library are not sprite sheets. There is not a block of code. You cannot do what you are wanting to do with dynamic images from the camera roll.

[import]uid: 199310 topic_id: 35131 reply_id: 139806[/import]