chnm / serendipomatic

http://serendipomatic.org/
26 stars 9 forks source link

Image Resizing #15

Closed scottkleinman closed 11 years ago

scottkleinman commented 11 years ago

We need a server-side solution for imposing minimum and maximum sizes on images by resizing images that are too small or too large. Also, we may need to detect if the URI returns a real image (check MIME type?) because the browser displays a placeholder.

rlskoeser commented 11 years ago

I'm not sure what we can do about images that are too small

I need to check europeana api to see if perhaps there are other sizes we can pull. I might just be grabbing the first one listed, possible there are multiple sizes

scottkleinman commented 11 years ago

Yes. It may not be possible to enlarge them. See the edit to my original comment for an issue related to image display. I'm also worried about how deal with the many URI's we get that don't seem to return actual images.

rlskoeser commented 11 years ago

We have logic still todo to filter out junk records, and I think for now we need to just toss anything without an image.

Hmm, interesting point on the url returning a valid image. Wonder how much time that takes if we have to pre-check all the images before serving out. That should be pretty easy to implement and should probably be part of our filter logic.

scottkleinman commented 11 years ago

Glad I brought it up. Filtering out anything without an image definitely limits this as a research tool, but I guess that's not really what we're going for at this point.

The placeholder effect seems to be browser specific (Chrome). Firefox is weirdly displaying the title link (rather than the image's alt tag), which is in a different div. We may not be able to get consistency across browsers with the flipping effect.

mialondon commented 11 years ago

If a record doesn't have an image, it usually doesn't have enough metadata to make it a useful result, and since this is meant to be a rich, immersive experience rather than a comprehensive federated search it's even more important to have good images.

And not all images are created equal - we'll end up with lots of images of printed documents or maybe manuscripts - it'd be good not to have too many of them in the mix, so the filter might also need to try to return a range of types.

scottkleinman commented 11 years ago

After much trouble, I have managed to get jQuery to replace broken image links with a default image. Mia's point is well taken from an aesthetic point of view, but it will certainly lessen the usefulness to those who do not work primarily with images. I think filtering for a range of types is an interesting idea, though I'm definitely glad I'm not the one who will be designing that filter. :-)

mialondon commented 11 years ago

Just to clarify - documents that have decent data will probably have an image, and if we can, we'll try to zoom in on that and make it as interesting as possible to view. We might be able to do better by DPLA documents than Europeana, IIRC Europeana items are sometimes single pages so the pages of a book or pamphlet can quickly overwhelm a results page.

And yay for your jQuery work!