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

Support upload of animated GIFs via REST #862

Closed
k1o0 opened this issue May 29, 2024 · 2 comments
Closed

Support upload of animated GIFs via REST #862

k1o0 opened this issue May 29, 2024 · 2 comments
Assignees

Comments

@k1o0
Copy link
Collaborator

k1o0 commented May 29, 2024

Animated GIFs are somehow converted to inanimate images when uploaded via REST, however this does not happen when they are uploaded via the admin interface web form. Supporting animated GIFs would be very useful for imaging snapshots.

@mayofaulkner
Copy link
Collaborator

mayofaulkner commented Jun 3, 2024

Automatic resize implemented when uploading via REST, need a way to avoid this resize when GIF detected, still need to implement a check on size.

@k1o0
Copy link
Collaborator Author

k1o0 commented Jun 3, 2024

Here are the relevant files for the image upload in Alyx. If image_width is 'orig', the file isn't resized, so this could be solved by simply settings this in the REST query. You could try this out then make this an option in ibllib code.
https://github.com/cortex-lab/alyx/blob/master/alyx/misc/models.py#L149-L168
https://github.com/cortex-lab/alyx/blob/master/alyx/misc/views.py#L126-L141
https://github.com/cortex-lab/alyx/blob/master/alyx/misc/serializers.py#L11-L47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants