switching to xl converter instead of imagemagick seems to have helped a lot. i can get lossless conversion to avif with no issues, but the file size of that can still be larger than i'd prefer. i think i struck a pretty good balance here. i originally wanted xl converter for conversion to jxl, as i found that was a pretty good format, but it's unfortunately not supported by scratch or most browsers. either way, i now have a better method of converting images to avif and can now save on memory without as many drawbacks. if i REALLY want to save memory, i can lower the framerate, but that's not super important to me right now.