Lokathor/imagine

Auto-decoder size limit

Lokathor opened this issue · 2 comments

We should place upper limits on how large of a file will be automatically decoded.

Apparently 16,384 is a common upper limit on textures, so a simple 17k limit seems fine I guess?

Actually if we make a new function we can make it configurable and have the current function call with a default limit.

Lucien on the game dev discord said they needed 64k pixel images in the past for astronomy

Actually, since we're already not going to panic on allocation failure, then the rest is up to the caller if they want to put an image size cap. The caller can already check the header data on their own and then not call us if the image is objectionable.

Closing as "not really needed".