Alright, just used ChatGPT to check if I could write better code and it worked. I haven't used the Canvas element in a while and wanted to export an image. I went the .toBlob() and FileReader() route to get a Base64 at the end. But huh, ChatGPT had a shorter solution lol.