There appears to be a range of sizes for the images returned by getMP
(http://www.theyworkforyou.com/api/docs/getMP).
For example
http://www.theyworkforyou.com//images/mps/10409.jpg is 49px x 59px
http://www.theyworkforyou.com/images/mpsL/11727.jpeg is 76px × 118px
Is there an upper limit to the size of these files? I ask for two reasons.
1) I'm developing a site for mobiles & don't want to send anyone a
multi-megabyte image.
2) I want my img tags to have width & height attributes.
Is it perhaps possible to have getMP also return image-height and image-width?
Full blog post describing what I'm wittering on about
http://shkspr.mobi/blog?p=1633
Thanks
T
Although I don't know about the image size issue I read your blog and
thought I should tell you that Edmund von der Burg at YourNextMP.com is
already working on scraping all the candidates, and then we'll be using
Democracy Club volunteers to fill in missing information. This information
will all be open and available for re-use, so I hope we can avoid some
duplication of effort.
Contacting edmund.v...@gmail.com or cvn-dev...@googlegroups.com
would probably be the best way to discuss this further.
Tim
>_______________________________________________
>Mailing list develope...@lists.mysociety.org
>Archive, settings, or unsubscribe:
>https://secure.mysociety.org/admin/lists/mailman/listinfo/developers-public
>
The image will either be 118px in height (if the URL is in the mpsL
directory), or 59px in height (if that's all we have, in mps directory);
width can vary, but will always be portrait.
> Is it perhaps possible to have getMP also return image-height and image-width?
I guess it could - patches/ forks are of course welcome. If height alone
is enough, they are fixed as above.
ATB,
Matthew
Is it either/or with the images, so you have to check getMP to know
which to use, or is the smaller one always present even if there's a
larger one available (eg, /images/mps/nnnn.jpg will always work)?
Mark
If there's a larger image, there is always a corresponding small image,
yes. You still need to check to see if there's an image at all.
ATB,
Matthew
OK, that's fair enough. A couple of other questions on images:
1. Are they re-usable under the mySociety CC licence, or are they from
another source which has its own licence restrictions?
2. (assuming that re-use is OK) Is it OK to hotlink to them on the
mySociety site, or would you prefer sites using them to cache them locally?
Cheers
Mark
--
Please sign my petition: http://petitions.pm.gov.uk/geopostcode
Read why: http://mark.goodge.co.uk/musings/422/locate-that-postcode/
They're under the same licence as anything else through the API. So use
and credit away.
> 2. (assuming that re-use is OK) Is it OK to hotlink to them on the
> mySociety site, or would you prefer sites using them to cache them locally?
I don't really mind; might be better if you hotlink, then if we find a
better photo, you'll automatically use it too - with links back to us as
ever :)
ATB,
Matthew
Where do they come from (the pictures)?
--
Francis Davey
It's no longer the case that they "fell of the back of a router".
Leaky things, them routers of old...
--
If tin whistles are made of tin, what are foghorns made of?
People who email us and provide us with pictures that we can use on the
site. A number of people also email us and tell us about photos in
encyclopaedias or on other random websites (especially for the 19th
century MPs in the system), but we obviously can't use those :)
ATB,
Matthew
>
> People who email us and provide us with pictures that we can use on the
> site. A number of people also email us and tell us about photos in
> encyclopaedias or on other random websites (especially for the 19th century
> MPs in the system), but we obviously can't use those :)
I am sorry. I have photographic copyright on the brain badly at the moment.
--
Francis Davey