Skip to content Skip to sidebar Skip to footer

How To Save A Rotated Image Which Was Stored In Gae Blobstore?

I want to rotate and save an image which was already stored in blobstore. For this I tried using images.Image.rotate method img = images.Image(blob_key=image.blob) img.rotate(180)

Solution 1:

A transformed image is just a collection of bytes that you can write back to the Cloud Storage - as a new object or overwrite an existing one (e.g. cloudstorage.open with mode set to "w" using Python GS Client).

Solution 2:

Writing to the blobstore used to be possible using the Files API, which is now deprecated.

You can use GCS instead for writing the image (GCS is recommended over Blobstore anyways).

You can still keep the blobstore API with GCS if you want. I think it should be possible to even mix blobstore and GCS transparently for your users so that you don't have to migrate all your existing images from the blobstore to GCS.

Post a Comment for "How To Save A Rotated Image Which Was Stored In Gae Blobstore?"