[mySociety:public] Image size of getMP

4 views
Skip to first unread message

Terence Eden

unread,
Feb 15, 2010, 4:40:25 PM2/15/10
to develope...@lists.mysociety.org
Hi All,

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

T.F.G. Green

unread,
Feb 15, 2010, 4:49:05 PM2/15/10
to mySociety public, general purpose discussion list
Hi Terence,

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
>


Matthew Somerville

unread,
Feb 15, 2010, 4:51:09 PM2/15/10
to mySociety public, general purpose discussion list
Terence Eden wrote:
> Is there an upper limit to the size of these files?

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

Mark Goodge

unread,
Feb 16, 2010, 3:30:48 PM2/16/10
to develope...@lists.mysociety.org
On 15/02/2010 16:51, Matthew Somerville wrote:
> Terence Eden wrote:
>> Is there an upper limit to the size of these files?
>
> 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 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

Matthew Somerville

unread,
Feb 16, 2010, 3:36:39 PM2/16/10
to mySociety public, general purpose discussion list
Mark Goodge wrote:
> 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)?

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

Mark Goodge

unread,
Feb 16, 2010, 3:49:57 PM2/16/10
to develope...@lists.mysociety.org

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/

Matthew Somerville

unread,
Feb 16, 2010, 4:12:13 PM2/16/10
to mySociety public, general purpose discussion list
Mark Goodge wrote:
> 1. Are they re-usable under the mySociety CC licence, or are they from
> another source which has its own licence restrictions?

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

Francis Davey

unread,
Feb 16, 2010, 4:53:19 PM2/16/10
to mySociety public, general purpose discussion list
On 16 February 2010 16:12, Matthew Somerville <mat...@mysociety.org> wrote:
> Mark Goodge wrote:
>>
>> 1. Are they re-usable under the mySociety CC licence, or are they from
>> another source which has its own licence restrictions?
>
> They're under the same licence as anything else through the API. So use and
> credit away.
>

Where do they come from (the pictures)?

--
Francis Davey

Adam McGreggor

unread,
Feb 16, 2010, 4:58:30 PM2/16/10
to mySociety public, general purpose discussion list
On Tue, Feb 16, 2010 at 04:53:19PM +0000, Francis Davey wrote:
> Where do they come from (the pictures)?

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?

Matthew Somerville

unread,
Feb 16, 2010, 5:12:21 PM2/16/10
to mySociety public, general purpose discussion list
Francis Davey wrote:
> Where do they come from (the pictures)?

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


Francis Davey

unread,
Feb 16, 2010, 5:16:04 PM2/16/10
to mySociety public, general purpose discussion list
On 16 February 2010 17:12, Matthew Somerville <mat...@mysociety.org> wrote:

>
> 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

Reply all
Reply to author
Forward
0 new messages