Skip to content

Add a utility function to report if payload will fit into image before encoding #49

@nervetrip

Description

@nervetrip

Would it be possible to add a utility function that would report if a given payload will fit inside a given image? Perhaps it could even report how many copies of it would fit?

I've found that larger payloads will sometimes error out when encoding into an image. I'm currently catching that error, reducing the number of copies, and then encoding again. It seems like doing some simple checks up front would be more optimal.

Perhaps there may be other information that might be useful before attempting to encode, but I'm not sure what that might be as I'm not too familiar with this library yet.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions