Discuss Scratch

PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

(get [color v] on top of::sensing)
(get [brightness v] on top of::sensing)

Don't know what this block should be called, but all it does is report the color (sprite, pen, bg, camera display?) that the sprite is right on top of.
The block/variable uses the center of the sprite that it is in (like position) and picks the color of the pixel at the same position just behind the “host” sprite

Usage:
set [color v] effect to (get [color v] on top of::sensing)

set [brightness v] effect to (get [brightness v] on top of::sensing)

This would be helpful for saving/loading drawings made in drawing programs (See my demo here)

If this is confusing please tell me so I can clarify

Last edited by PitchBlackNights (April 19, 2022 23:27:33)


This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
k0d3rrr
Scratcher
1000+ posts

Image Capture Optimizing

I could be wrong, but this is already being suggested here: https://scratch.mit.edu/discuss/topic/12488
If I am correct, please use the link above to continue the discussion.


Animated button created by me


Despite what my About section says, I have been using Scratch before 2019. 2019 was the year that I first joined Scratch.
Kiska-7275
Scratcher
1000+ posts

Image Capture Optimizing

k0d3rrr wrote:

I could be wrong, but this is already being suggested here: https://scratch.mit.edu/discuss/topic/12488
If I am correct, please use the link above to continue the discussion.
That suggestion is about adding an effect reporter
Make sure to reread the OP carefully, this topic is not a dupe

Всем здоровья и удачи :: pen cap
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

k0d3rrr wrote:

I could be wrong, but this is already being suggested here: https://scratch.mit.edu/discuss/topic/12488
If I am correct, please use the link above to continue the discussion.
that wouldn't work because that reports the current effects applied to the target, and a blue target with no effects will still return a 0 (red) for color

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
k0d3rrr
Scratcher
1000+ posts

Image Capture Optimizing

Kiska-7275 wrote:

k0d3rrr wrote:

I could be wrong, but this is already being suggested here: https://scratch.mit.edu/discuss/topic/12488
If I am correct, please use the link above to continue the discussion.
That suggestion is about adding an effect reporter
Make sure to reread the OP carefully, this topic is not a dupe
Now… Let me rephrase that…
I could definitely be incorrect, but I believe someone has possibly suggested this suggestion.


Animated button created by me


Despite what my About section says, I have been using Scratch before 2019. 2019 was the year that I first joined Scratch.
watashiwanekodesu
New to Scratch
9 posts

Image Capture Optimizing

How would this work if there's more than one color beneath the sprite? Pick the most common color? Average? Or would it only apply to the center pixel of the sprite? All of those options are potentially confusing.
Not only that, but the block could also be confusing for anyone new to Scratch (I say that like I'm not because this is my 3rd/4th account lol), because of all the ways in which it could work.

The only reason I could see for adding this is the absence of a viable workaround.

define semicolon
set [n] to [1]
repeat until <not<C-style language>>
repeat (n)
compiletime_error;
end
change [n] by ((n)*(n))
k0d3rrr
Scratcher
1000+ posts

Image Capture Optimizing

Okay, I think I've found the right duplicate topic this time: https://scratch.mit.edu/discuss/topic/145320/


Animated button created by me


Despite what my About section says, I have been using Scratch before 2019. 2019 was the year that I first joined Scratch.
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

watashiwanekodesu wrote:

How would this work if there's more than one color beneath the sprite? Pick the most common color? Average? Or would it only apply to the center pixel of the sprite? All of those options are potentially confusing.
Not only that, but the block could also be confusing for anyone new to Scratch (I say that like I'm not because this is my 3rd/4th account lol), because of all the ways in which it could work.

The only reason I could see for adding this is the absence of a viable workaround.

I will update the post, but to clarify, It will use the center of the sprite (like position) and pick the color of the sprite that is just 1 layer behind the “host” sprite

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

k0d3rrr wrote:

Okay, I think I've found the right duplicate topic this time: https://scratch.mit.edu/discuss/topic/145320/
Yeah, that is kind of a dupe, but his block/variable would be harder for ST to import as it has access to the color that other sprites are on

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

bump

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

bump

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

I added a demo (https://scratch.mit.edu/projects/657722922/) for an Image Capture System that could be improved with this new variable

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

Ok, I have found a work around, but it isn't as fast as a built in block

https://scratch.mit.edu/studios/31461577

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

bump

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

bump

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

reallysoftuser wrote:

Couldn't this possibly lead to the security issues, if the project is using the camera of the user?

Yes, but you can already do that now (and I assume that ST would just disable this block from picking the colors of the camera), so this is just a block to optimize (greatly) an already existing method.

See this studio by Griffpatch

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS
PitchBlackNights
Scratcher
43 posts

Image Capture Optimizing

bump

This is a new account
Check out my old account: @free_d

ALL OF MY POSTS

Powered by DjangoBB