Noah McIlraith
Noah McIlraith

Reputation: 14292

Which types of files can images.get_serving_url() serve?

I'm interested to know which types of files can be served by GAE's image server.

Or better yet, the location of a list/tuple of these types stored in the library somewhere (to automatically support future formats).

Upvotes: 1

Views: 181

Answers (1)

systempuntoout
systempuntoout

Reputation: 74134

While Java library offers Enum Image.Format listing all the Image formats usable by the images api, Python does not seem to offer this kind of information.

Looking at the source code, the list of supported image format is hardcoded as for example:

if img_format not in ("BMP", "GIF", "ICO", "JPEG", "PNG", "TIFF"):
      raise apiproxy_errors.ApplicationError(
          images_service_pb.ImagesServiceError.NOT_IMAGE)

It looks like a legit reason to file a new feature request.

Upvotes: 1

Related Questions