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

Submitting GIF support changes #428

Open
wants to merge 10 commits into
base: development
Choose a base branch
from

Conversation

captmiddy
Copy link

This is a pull request with GIF only changes. Once I hear back what types of tests would be expected, I will commit tests to the test folder for the GIF support.

Copy link
Contributor

@alexwlchan alexwlchan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @captmiddy!

In terms of tests, I think the minimum we need is a new test in webapp_t.py that requests a GIF image as its source – probably as a GIF and a JPEG. You’ll need to add a new test image.

Do people use animated GIFs with IIIF? Feels more like a v3 thing – but a test that an animated GIF can be requested as a non-animated format (e.g. JPEG, PNG) would also be useful.

It would be nice to test ImageInfo directly as well, but I don’t think we have unit tests for that.

@@ -200,7 +200,7 @@ def from_image_file(self, formats=[], max_size_above_full=200):

if self.src_format == 'jp2':
self._from_jp2(self.src_img_fp)
elif self.src_format in ('jpg','tif','png'):
elif self.src_format in ('gif','jpg','tif','png'):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: space after comma please

@arthurian
Copy link

Hi all, I just wanted to add my voice in support of this PR. I would be interested in seeing this functionality merged, as we support GIF images for some users in our Loris installation.

In the past we've patched our install as this PR demonstrates, but it would be better to have it in the upstream repository and officially supported as an option. I'd be happy to help out with the requested changes if needed.

@bcail
Copy link
Contributor

bcail commented Apr 3, 2020

@arthurian great!
@captmiddy can @arthurian help out with the requested changes? Or submit a new PR?

@captmiddy
Copy link
Author

That would be great, I don't have time to work this right now with a bunch of other project work. We have been using this patch on our own version of Loris for a long time now but we have other local patches we have implemented that we should also look into.

@arthurian
Copy link

@captmiddy Just a heads up that I sent a PR to your branch with the requested changes (captmiddy#2).

Added tests for requesting a GIF image as its source.
@captmiddy
Copy link
Author

I didn't rebase the webapp_t.py file before merging in this change. I honestly don't have time, but the changes that are off shouldn't be hard to merge. I don't have write to attempt a resolution anyway. The requested tests do appear to be in place now though.

@bcail
Copy link
Contributor

bcail commented May 8, 2020

@alexwlchan I got the test passing. You want to take a look and squash-merge if it looks OK?

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

Successfully merging this pull request may close these issues.

4 participants