logo
down
shadow

Images in Blobstore: inefficient to get metadata?


Images in Blobstore: inefficient to get metadata?

By : George Cordahi
Date : November 22 2020, 09:00 AM
around this issue Actually the Blobstore is not exactly optimized for serving images, it operates on any kind of data. The BlobReader class can be used to manage the raw blob data.
The GAE Images service can be used to manage images (including those stored as blobs in the BlobStore). You are right in the sense that this service only offers info about the uploaded image only after executing a transformation on it, which doesn't help with deleting undesirable blob images prior to processing.
code :
>>> image = Image.open('Spain-rail-map.jpg')
>>> image.format
'JPEG'
>>> image.size
(410, 317)
  from PIL import Image
  with blobstore.BlobReader(uploads[0].key()) as fd:
      image = Image.open(fd)
      logging.error('format=%s' % image.format)
      logging.error('size=%dx%d' % image.size)


Share : facebook icon twitter icon
Entity images + Blobstore

Entity images + Blobstore


By : Miguel Gaspar
Date : March 29 2020, 07:55 AM
I wish this help you What you are looking for is get_serving_url(blob_key, size=None, crop=False, secure_url=None)
Try this method on the blob and you will get an image url.
Serving blobstore images through SSL

Serving blobstore images through SSL


By : MM45
Date : March 29 2020, 07:55 AM
Hope this helps you could just strip the http: part from the link and it will automatically serve the link with the protocol your page is serving.
so the link would look like this:
R: tm: TextDocument level metadata setting looks to be very inefficient

R: tm: TextDocument level metadata setting looks to be very inefficient


By : Aaron J Smith
Date : March 29 2020, 07:55 AM
I wish did fix the issue. I'm loading text documents from the database, then I create corpus from them, and finally I set prefixed id of the document (I need to use prefix, since I've got documents of several types). , I've changed my code to set IDs during initialization of the VCorpus.
code :
rs <- dbSendQuery(con,"SELECT ('e:'||id) AS id, content, 'pl'::TEXT AS language FROM entry")
entry.d = data.table(fetch(rs,n=-1))
entry.dfs = DataframeSource(entry.d)
reader <- readTabular(mapping=list(content="content", id="id", language='language'))
entry.vc = VCorpus(entry.dfs, readerControl = list(reader = reader))
Retrieving metadata of a photo saved to blobstore

Retrieving metadata of a photo saved to blobstore


By : Elanor Hinton
Date : March 29 2020, 07:55 AM
To fix this issue I would use exif-py as follows:
code :
blob_reader = blobstore.BlobReader(blob_key)
blob_reader_data = StringIO.StringIO(blob_reader.read())
tags = exifread.process_file(blob_reader_data)
Serving images directly from GCS in GAE using Blobstore API and Images API

Serving images directly from GCS in GAE using Blobstore API and Images API


By : rajneesh mohanty
Date : March 29 2020, 07:55 AM
I hope this helps . Instructions are here: https://developers.google.com/appengine/docs/python/images/functions#Image_get_serving_url
Start with an image hosted in Google Cloud Storage.
shadow
Privacy Policy - Terms - Contact Us © animezone.co