Discuss Scratch

airplanedodge
Scratcher
1000+ posts

Live images in forums

So I wanted an image to use in the forums that auto updates using cloud data. Does anyone know if this is possible?

Last edited by airplanedodge (March 5, 2021 14:15:32)

ninjaMAR
Scratcher
1000+ posts

Live images in forums

Its possible. Open an image using an external script(node js ,python). Convert the image into numbers.Send those number over the cloud (this works in node js). Use a scratch project to render the data from the cloud using pen.
airplanedodge
Scratcher
1000+ posts

Live images in forums

ninjaMAR wrote:

Its possible. Open an image using an external script(node js ,python). Convert the image into numbers.Send those number over the cloud (this works in node js). Use a scratch project to render the data from the cloud using pen.
thanks, i forgot to add that i wanted the live image to use in the scratch forums
ninjaMAR
Scratcher
1000+ posts

Live images in forums

airplanedodge wrote:

ninjaMAR wrote:

Its possible. Open an image using an external script(node js ,python). Convert the image into numbers.Send those number over the cloud (this works in node js). Use a scratch project to render the data from the cloud using pen.
thanks, i forgot to add that i wanted the live image to use in the scratch forums
I think you could maybe use project thumbnails and have a script to update them
I would edit the OP and topic name to say something like live images in forums

Last edited by ninjaMAR (March 5, 2021 14:09:38)

airplanedodge
Scratcher
1000+ posts

Live images in forums

ninjaMAR wrote:

airplanedodge wrote:

ninjaMAR wrote:

Its possible. Open an image using an external script(node js ,python). Convert the image into numbers.Send those number over the cloud (this works in node js). Use a scratch project to render the data from the cloud using pen.
thanks, i forgot to add that i wanted the live image to use in the scratch forums
I think you could maybe use project thumbnails and have a script to update them
I would edit the OP and topic name to say something like live images in forums

ahh thanks. let me glitch edit the post.
Maximouse
Scratcher
1000+ posts

Live images in forums

As ninjaMAR said, you need to use a project thumbnail. The API for updating them is https://scratch.mit.edu/internalapi/project/thumbnail/<project ID>/set/
airplanedodge
Scratcher
1000+ posts

Live images in forums

Maximouse wrote:

As ninjaMAR said, you need to use a project thumbnail. The API for updating them is https://scratch.mit.edu/internalapi/project/thumbnail/<project ID>/set/

ok. but will it change everytime something in the project changes? I was thinking about creating something like a cloud survey about what features I should add in a game
A-E-
Scratcher
100+ posts

Live images in forums

airplanedodge wrote:

So I wanted an image to use in the forums that auto updates using cloud data. Does anyone know if this is possible?
You used to be able to do this with MJPEG, but since the Wikimedia redirect hole was closed there's not a way to have live updates anymore.
CST1229
Scratcher
1000+ posts

Live images in forums

A-E- wrote:

airplanedodge wrote:

So I wanted an image to use in the forums that auto updates using cloud data. Does anyone know if this is possible?
You used to be able to do this with MJPEG, but since the Wikimedia redirect hole was closed there's not a way to have live updates anymore.
Unless you use a project thumbnail, of yourse.
airplanedodge
Scratcher
1000+ posts

Live images in forums

CST1229 wrote:

A-E- wrote:

airplanedodge wrote:

So I wanted an image to use in the forums that auto updates using cloud data. Does anyone know if this is possible?
You used to be able to do this with MJPEG, but since the Wikimedia redirect hole was closed there's not a way to have live updates anymore.
Unless you use a project thumbnail, of yourse.

ok, but i have NO idea how to get a project thumbnail to update on its own using data from the cloud
It's probably possible cause of S3Bridge but I'm not sure
ninjaMAR
Scratcher
1000+ posts

Live images in forums

Maximouse wrote:

As ninjaMAR said, you need to use a project thumbnail. The API for updating them is https://scratch.mit.edu/internalapi/project/thumbnail/<project ID>/set/
What would you send? A file?
Maximouse
Scratcher
1000+ posts

Live images in forums

ninjaMAR wrote:

Maximouse wrote:

As ninjaMAR said, you need to use a project thumbnail. The API for updating them is https://scratch.mit.edu/internalapi/project/thumbnail/<project ID>/set/
What would you send? A file?
Yes, a PNG file.
airplanedodge
Scratcher
1000+ posts

Live images in forums

Maximouse wrote:

As ninjaMAR said, you need to use a project thumbnail. The API for updating them is https://scratch.mit.edu/internalapi/project/thumbnail/<project ID>/set/
Can it do it automatically when a set condition is met? Like when a cloud variable for a project = 3 it changes the thumbnail to a different image.
FYI, I might be able to write the code on my own but I don't really know javascript yet.

Last edited by airplanedodge (March 9, 2021 17:28:43)

ninjaMAR
Scratcher
1000+ posts

Live images in forums

Maximouse wrote:

ninjaMAR wrote:

Maximouse wrote:

As ninjaMAR said, you need to use a project thumbnail. The API for updating them is https://scratch.mit.edu/internalapi/project/thumbnail/<project ID>/set/
What would you send? A file?
Yes, a PNG file.
Thanks

airplanedodge wrote:

Maximouse wrote:

As ninjaMAR said, you need to use a project thumbnail. The API for updating them is https://scratch.mit.edu/internalapi/project/thumbnail/<project ID>/set/
Can it do it automatically when a set condition is met? Like when a cloud variable for a project = 3 it changes the thumbnail to a different image.
FYI, I might be able to write the code on my own but I don't really know javascript yet.
You could make one in python.
airplanedodge
Scratcher
1000+ posts

Live images in forums

ninjaMAR wrote:

airplanedodge wrote:

Maximouse wrote:

As ninjaMAR said, you need to use a project thumbnail. The API for updating them is https://scratch.mit.edu/internalapi/project/thumbnail/<project ID>/set/
Can it do it automatically when a set condition is met? Like when a cloud variable for a project = 3 it changes the thumbnail to a different image.
FYI, I might be able to write the code on my own but I don't really know javascript yet.
You could make one in python.
Hmm ok. Is python easier than javascript?

Last edited by airplanedodge (March 10, 2021 14:21:38)

Maximouse
Scratcher
1000+ posts

Live images in forums

airplanedodge wrote:

Hmm ok. Is python easier than javascript?
I think so, but both are very useful and not too hard.
airplanedodge
Scratcher
1000+ posts

Live images in forums

Maximouse wrote:

airplanedodge wrote:

Hmm ok. Is python easier than javascript?
I think so, but both are very useful and not too hard.
ok that's good news
airplanedodge
Scratcher
1000+ posts

Live images in forums

Ok, so it seems like I need the cloud variables api and the cdn2 thumbnail api. Is that right?
I do not have the cloud var api, so if i need that, can someone provide it?
One last thing. Can it update the thumbnails using images in assets.scratch.mit.edu?

Last edited by airplanedodge (March 12, 2021 18:55:20)

A-E-
Scratcher
100+ posts

Live images in forums

CST1229 wrote:

A-E- wrote:

airplanedodge wrote:

So I wanted an image to use in the forums that auto updates using cloud data. Does anyone know if this is possible?
You used to be able to do this with MJPEG, but since the Wikimedia redirect hole was closed there's not a way to have live updates anymore.
Unless you use a project thumbnail, of yourse.
Can't stream MJPEG in a project thumbnail.
airplanedodge
Scratcher
1000+ posts

Live images in forums

A-E- wrote:

CST1229 wrote:

A-E- wrote:

airplanedodge wrote:

So I wanted an image to use in the forums that auto updates using cloud data. Does anyone know if this is possible?
You used to be able to do this with MJPEG, but since the Wikimedia redirect hole was closed there's not a way to have live updates anymore.
Unless you use a project thumbnail, of yourse.
Can't stream MJPEG in a project thumbnail.
not mjpeg in a project thumbnail, just a regular old thumbnail that update using the thumbnail API.

Powered by DjangoBB