In response to another question, a commenter mentioned an undocumented URI option I was not aware of to flip images horizontally/vertically with the App Engine images service.
The documentation mentions a few basic options:
Would be nice to generate a comprehensive list of options, or if someone could provide any more options they know about here to serve as de facto documentation.
Between reading some random posts and manually doing some investigative research, I have put together the following list. Please drop any other knowledge in other answers or in comments and I can integrate it here.
We can effect various image transformations by tacking strings onto the end of an App Engine blob-based image URL, following an = character. Options can be combined by separating them with hyphens, eg.:
http://[image-url]=s200-fh-p-b10-c0xFFFF0000
or:
http://[image-url]=s200-r90-cc-c0xFF00FF00-fSoften=1,20,0:
... which have the following effect (documentation below):
As an example of how awesome this is, here's an animated GIF, downsized and inverted:
… which we can then convert into an MP4 video with one extra parameter: click to see MP4 version
rg — forces the resulting image to be GIF
v{0,1,2,3} — sets image to a different format option (works with JPG and WebP)
Forcing PNG, WebP and GIF outputs can work in combination with circular crops for a transparent background. Forcing JPG can be combined with border color to fill in backgrounds in transparent images.
These parameters have been seen in use, but their effect is unknown: no, nd, mv
Some options (like =l for JPEG quality) do not seem to generate new images. If you change another option (size, etc.) and change the l value, the quality change should be visible. Some options also don't work well together. This is all undocumented by Google, probably with good reason.
Moreover, it's probably not a good idea to depend on any of these options existing forever. Google could remove most of them without notice at any time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With