Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google HPIS don't animate gifs

I'm using Google Cloud Platform (App Engine). I have a High Performance Image Store [HPIS] url for an animated GIF (example below). I know there are some URL arguments you can provide to manipulate the image, eg =s1600 or =s128-c.

I was wondering if there's an argument to prevent a GIF from animating. Maybe just showing the first frame of the GIF or something. Also, what other arguments are out there?

https://lh3.googleusercontent.com/fh7nuo67JhRn84I7hQ5hWjsi9e9WaH8Lq3JNUCAWsu5_kcp0HozkGKQO2c3KV_1CN_5cmgs3P0oNY3--Ejp8T9goDMy3Y75cig

like image 367
Wesley Workman Avatar asked Feb 07 '23 18:02

Wesley Workman


1 Answers

Over the years I've been able to uncover the following "extra features" that HPIS has to offer... the option you want is -k which will stop the animation:

-bXX           -- border pixel size (border color depends on image color?)
-c             -- crop center
-hXXXX         -- height
-h             -- (without XXX) puts white padding around border
-d             -- download
-g             -- Google+ panorama XML?
-k             -- stop animation
-n             -- crop from... somewhere between top and center?  (requires -hXXX -wYYYY)
-p             -- crop from top?
-rXXX          -- rotate in degrees (90/180/270)
-sXXXX         -- size to best fit
-wYYYY         -- width
-v[0|1|2|3]    -- quality level/file size (highest to lowest)


Other combos:  -hXXXXX-wYYYY-s  -- stretch to fit (only some images will stretch?)

would love to hear from anyone else that has uncovered more of these gems?

like image 111
Nick Franceschina Avatar answered Feb 13 '23 05:02

Nick Franceschina