Cloud Storage getImageServingUrl questions

106 views
Skip to first unread message

Paul Canning

unread,
Sep 23, 2015, 9:58:28 AM9/23/15
to Google App Engine
I have a page that loads in a lot of different sized images via AJAX, some "landscape" (1280x720) and some "portrait" (720x1280).

I'd like to display them in Bootstrap 3, using the responsive image class.

Ideally it'd be good to show all images using a max height limit, say 200px.

Using getImageServingUrl's size option doesn't really do what I want, as this only serves a version where the dimension with the highest value is used.

E.g a 1280x720 image sized to say 320, would have a width of 320 and a height of 180

But a 720x1280 image has its height changed, to 320, with the wdith being 180.

So I have two images, with heights of 180 and 320, which doesn't look right.

Add in loads more images and the grid starts to look ugly.

So is there a way to achieve a uniform grid where portrait and landscape images are resized to fit the grid better?

Ryan (Cloud Platform Support)

unread,
Sep 23, 2015, 10:21:00 AM9/23/15
to Google App Engine
Salutations Paul,

Have you looked at the crop flag


OriginalOriginalImage
CroppedImage
Not CroppedImage

Paul Canning

unread,
Sep 23, 2015, 10:33:03 AM9/23/15
to Google App Engine
I'm guessing then there is no way to do this without cropping?

--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/zOsPCICZQqo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/ffc41374-38a7-4377-a56e-7c394043bed3%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
---------------------------------
Paul Canning
[ software artist ]
---------------------------------
[draw&code]  
digital creative studio

---------------------------------

Ryan Bruyere

unread,
Sep 23, 2015, 10:36:04 AM9/23/15
to Google App Engine
Not with the getImageServingUrl. As you can see in the demo you don't lose much. There might be other PHP tools out there to do what you need.

Google | Ryan Bruyere | GAE TSR | Prime | Vendor | rbru...@google.com

Cloud BigTable logo_1


Reply all
Reply to author
Forward
0 new messages