Canvas

New releases and general discussions.

Post » Sun May 10, 2009 6:24 am

Please add possibility to read red, green and blue values (or RGB code) at given point by Canvas object.
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Sun May 10, 2009 10:19 am

It'd be very slow, what precise use are you thinking of?

You could transfer it to the Image Manipulator plugin and read values using that.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun May 10, 2009 12:54 pm

[quote="Rich":273dzq03]It'd be very slow, what precise use are you thinking of?[/quote:273dzq03]
I need visual map that is also an array of 3 low precision integers. Canvas with reading RGB would be best. In Multimedia Fusion there is Overlay object which does that, but I wanted to port my app to Construct. What about second plugin, identical to Canvas but with reading possibility?

[quote="Rich":273dzq03]You could transfer it to the Image Manipulator plugin and read values using that.[/quote:273dzq03]
Well, I was hoping that I might use Canvas, as it's faster.
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Sun May 10, 2009 1:25 pm

Reading pixels directly from a Direct-X texture is far slower than the method I suggested, using the 'copy from sprite' action of Image Manipulator, and then using the Get R/G/B expressions of it.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun May 10, 2009 1:33 pm

Oh, well, then it's great :) I just didn't know it. Thanks!
B
2
G
4
Posts: 12
Reputation: 1,074

Post » Sun May 10, 2009 1:35 pm

It should probably be renamed 'copy from sprite/canvas', but it's very handy as it is :).
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun May 10, 2009 3:31 pm

B
2
G
4
Posts: 12
Reputation: 1,074

Post » Sun May 10, 2009 3:43 pm

Ah it was fixed for the next build so I didn't notice it.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Sun May 10, 2009 6:11 pm

Was setting R, G or B in Image Manipulator fixed too? Because now it's default to use color selector for it, which crashes application (because most colors don't fit in 0-255). It should be always expression and, if possible, greyscale selector or something.
B
2
G
4
Posts: 12
Reputation: 1,074


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests