Change in behavior of get_serving_url

427 views
Skip to first unread message

Sean

unread,
Dec 7, 2011, 12:37:16 AM12/7/11
to google-a...@googlegroups.com
Hi,

  I've noticed that some time in the last couple days, the behavior of the url returned from get_serving_url has changed.  It used to return an image at full resolution, now it appears to default to 512 x 512.  Also, appending =s1600 used to return a 1600 x 1600 image, even with a 100 x 100 source, but, it seems that it no longer scales resolution up.

  Has anybody else noticed this?  Should I just use =s1600 where I want the full size image?

Thanks,
Sean

Brandon Wirtz

unread,
Dec 7, 2011, 1:13:13 AM12/7/11
to google-a...@googlegroups.com

Good I’m not insane.  I don’t know the expected behavior but I did notice this.

 

I am changing some code to use this and I was pretty sure the behavior changed but I was new to the code, so yeah it may have changed.

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/kQaJDPbiOVsJ.
To post to this group, send email to google-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.

blackpawn

unread,
Dec 7, 2011, 4:00:25 PM12/7/11
to google-a...@googlegroups.com
I'm seeing this too since the maintenance yesterday.  Would have been helpful to have a heads up on this change so we could prepare our apps for it instead of really freaking our users out.

Stuart Langley

unread,
Dec 7, 2011, 4:47:56 PM12/7/11
to google-a...@googlegroups.com
Hi Guys,

Sorry - we dropped the ball on this one. The service we use to serve images recently changed the default serving size from 1600 to 512, and we missed the announcement and the opportunity to give you a heads up about the change. 

From the (missed) announcement 

"What can you do? 
You can still explicitly set the size that you want and you will still the that size. In this case, setting it to s1600 explicitly will still get you a 1600px 
image. Please use the exact size that you need instead of requesting s1600 and then resizing in the browser. "

Regards,
Stuart


Sean

unread,
Dec 7, 2011, 5:17:12 PM12/7/11
to Google App Engine
OK, thanks everybody for confirming. Using s1600 is an easy change.

Sean

Andreas

unread,
Dec 8, 2011, 11:52:24 AM12/8/11
to google-a...@googlegroups.com
i think this is not cool.
setting no size should always return the full image size up to 1600px.

a 512px default size does not make sense, specially because u cant see it. the serving url does not redirect to =s512.

why did u change this?

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.

Stuart Langley

unread,
Dec 8, 2011, 12:19:48 PM12/8/11
to google-a...@googlegroups.com
For what it's worth, the decision to change the default scaling size was made by the team that is responsible for the imaging service that is used, not by app engine folks. While this maybe of little comfort, it's just something that is not in our control.

Specifying a size parameter of 0 will get the image served at the original size, and specifying a size of 1600 will get the behaviour as it was before the change was made.


sergio...@gmail.com

unread,
Dec 9, 2011, 3:23:33 PM12/9/11
to Google App Engine
So specifying a size of 0, will get the mage served at the original
size?
That would be great if you did not have this little gem in the code
for get_serving_url

def get_serving_url(blob_key,
size=None,
crop=False):
......
if size:
url += "=s%s" % size
......


Guess what happens when you pass 0 as size?

Any idea other than manually adding the =s0 to the url returned?

Can you please tell the team responsible for the image service that
the first rule of an API is that you *do*not*change* the API
behavior?

Kyle Finley

unread,
Dec 9, 2011, 4:05:55 PM12/9/11
to google-a...@googlegroups.com
Could you pass 0 as a string?

url = get_serving_url(key, size="0")

Andreas

unread,
Dec 9, 2011, 4:11:24 PM12/9/11
to google-a...@googlegroups.com
this should not make any difference.

>>> size = 0
>>> '%s' %size
'0'

the problem is that the behaviour is not right to me. if i dont specify a size the original (up to a max of 1600px) should be returned and not a resized version.
another non logic thing is that passing 0 returns a not resized image. 

not really straight forward.



On Dec 9, 2011, at 4:05 PM, Kyle Finley wrote:

Could you pass 0 as a string?

url = get_serving_url(key, size="0")

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/CQ1IcMtqWvkJ.

sergio...@gmail.com

unread,
Dec 10, 2011, 3:47:40 PM12/10/11
to Google App Engine

Agreed. That was the previous behavior. Now you have to add =s0 to the
result of the get_serving_url, passing 0 as string does not work.

The API should not have changed behavior and the new behavior is not
logical.
Why should I have to specify the size as 0 if what I want is the
original image?

Why should the default use case, to return a resized image?

This is clearly a cost cutting measure by Google as a 512x512 image
should be smaller and cost less to serve. Google is betting most devs
wont change their code.


On Dec 9, 9:11 pm, Andreas <a.schmi...@gmail.com> wrote:
> this should not make any difference.
>
> >>> size = 0
> >>> '%s' %size
>
> '0'
>
> the problem is that the behaviour is not right to me. if i dont specify a size the original (up to a max of 1600px) should be returned and not a resized version.
> another non logic thing is that passing 0 returns a not resized image.
>
> not really straight forward.
>
> On Dec 9, 2011, at 4:05 PM, Kyle Finley wrote:
>
>
>
> > Could you pass 0 as a string?
>
> > url = get_serving_url(key, size="0")
>
> > --
> > You received this message because you are subscribed to the Google Groups "Google App Engine" group.

> > To view this discussion on the web visithttps://groups.google.com/d/msg/google-appengine/-/CQ1IcMtqWvkJ.

TomN

unread,
Dec 26, 2011, 6:10:27 AM12/26/11
to Google App Engine
I'd like to chime in that this change by the Picasa team is lame. They
should change it back so all existing articles, documentation,
examples, etc (not just from Google) works as it always has.

I realize their motivation may have been to reduce traffic load or
something equally noble... and they might see a dip for a while;
however, everyone will eventually tack on the param to default the
size back to original and we'll be right back to where we are. Well,
not quite because there will be conflicting information lingering on
the web.

-Tom Nielsen

Andreas

unread,
Dec 27, 2011, 6:52:53 PM12/27/11
to google-a...@googlegroups.com
i agree. it was one of the most unnecessary changes ever.

> --
> You received this message because you are subscribed to the Google Groups "Google App Engine" group.

Reply all
Reply to author
Forward
0 new messages