Suppose we have a png with 3 layers.
Is possible for example to change the color of a circle in a layer?
Regards [import]uid: 13114 topic_id: 17113 reply_id: 317113[/import]
Suppose we have a png with 3 layers.
Is possible for example to change the color of a circle in a layer?
Regards [import]uid: 13114 topic_id: 17113 reply_id: 317113[/import]
I’m assuming that you’re talking about a multi-frame APNG file?
As far a I know it’s an unofficial extension to the Portable Network Graphics (PNG) specification, however it’s compatible with other PNG decoders since the first frame is stored as a normal PNG stream.
My guess is that you won’t be able to access anything else than the first frame with Corona, where you should be able to use the new tinting and gradient functionality. [import]uid: 70847 topic_id: 17113 reply_id: 64416[/import]
Hi Ingemar!
Tks for your reply.
I was talking about a common png.
Lets say you just put a circle and a square in it.
When you load you app… is possible at run-time to change the color of such objects?
Regards
[import]uid: 13114 topic_id: 17113 reply_id: 64538[/import]
There’s no way to determine a particular shape within an image.
If you have two shapes that you want to change the color of independently, like you say, a square and a circle, then I’d create two images. One solid white square and one white circle, and save them as PNG’s with background transparency. Create a display group in Corona and load the images in the order you want them to be layered in, and then use the new tinting feature on the individual images within the group to change the color.
Admittedly, I haven’t tried this myself, but I’m assuming that this should work just fine. [import]uid: 70847 topic_id: 17113 reply_id: 64565[/import]