Skip to content

Change color of image pixel #1386

Answered by RobDangerous
Ron5s asked this question in General
Discussion options

You must be logged in to vote

You can use lock/unlock to change an image but you have to write all the pixels and don't get access to their old values that way. You can access the original data by calling Image.at when the image is set to readable (see https://github.com/Kha-Samples/TPlayer/blob/master/khafile.js for how to do that for images that are handled by the Assets class). But all of that is highly discouraged because it is super-slow, use shaders instead if you can.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Ron5s
Comment options

Answer selected by RobDangerous
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants