Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[python] Add option to export "thumbnails" during generation #32

Closed
Montspy opened this issue Mar 23, 2022 · 1 comment · Fixed by #30
Closed

[python] Add option to export "thumbnails" during generation #32

Montspy opened this issue Mar 23, 2022 · 1 comment · Fixed by #30
Assignees
Labels
enhancement New feature or request

Comments

@Montspy
Copy link
Owner

Montspy commented Mar 23, 2022

We've seen several NFT collections with different image and animation_url fields.
For animated NFTs, usually a GIF is in the image field and the full blown video (MP4 or WebM) is in the animation_url field
For static NFTs, a lower resolution image can be in image and the full resolution in animation_url

I propose we add the option to generate those thumbnails either as a command line argument:
Example: --thumbnail 1280x720 on an animated collection would export GIFs to the collection_name/thumbnails with a resolution of 1280x720
Example: --thumbnail 1200x1200 on static collections would export PNGs to the collection_name/thumbnails with a resolution of 1200x1200

Or as a key/value pair in traits.py/traits.json:

    # No "thumbnails" key/value pair does not generate thumbnails
    "thumbnails": [1280, 720] # Generate thumbnails of that resolution
    "thumbnails": [] # Generate thumbnails of default resolution
@Montspy Montspy added the enhancement New feature or request label Mar 23, 2022
@Montspy
Copy link
Owner Author

Montspy commented Mar 27, 2022

Implemented in #30
Specify thumbnail width (and height, optional) in traits.config["thumbnails"]

@Montspy Montspy self-assigned this Mar 27, 2022
@Montspy Montspy linked a pull request Mar 27, 2022 that will close this issue
7 tasks
@sk33z3r sk33z3r changed the title Add option to export "thumbnails" during generation [python] Add option to export "thumbnails" during generation Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant