gnlp
February 9, 2025, 2:46am
1
Good work so far
I love trying to implement things like this from just the specification
I did an animated GIF one
Finally got a basic working version of a native Snap! GIF file reader
[image]
Its very slow (as I'm still debugging it) but it should work
Please let me know if it fails on any files for you
To use - click on 1st script to load a GIF file in and then click on the 2nd one to convert the file into costumes.
https://snap.berkeley.edu/snap/snap.html#present:Username=cymplecy&ProjectName=ReadGIF
Uses @pumpkinhead File Import library blocks to load the GIF file in
[update 1 19Nov20 - Known iss…
dardoro
February 10, 2025, 10:28am
3
Every chunk must be decoded to full RGBA.
QOI_OP_RGB, DIFF, LUMA must recreate the last used A value.
I've not done it; I just found that the output is not a square RGBA matrix.
@dardoro I just came here to say that my current progress as not quite there yet
Closer but still no coconut
gnlp
February 10, 2025, 9:11pm
6
Thanks cymplecy and dardoro. There's a shorter way to keep the previous pixel's alpha in DIFF and LUMA: adding the previous pixel to a list where the fourth item is 0 after going through surrounding operators.
dardoro
February 10, 2025, 9:59pm
7
Shift Live coding ...
makes this script 10 time faster i.e. 4 compared to 40 s
sarpnt
February 11, 2025, 12:30am
8
i tried my hand at speeding it up. lots of cursed hyperblocks but worth it for the lower block count
system
Closed
March 13, 2025, 12:30am
9
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.