Assigned
Status Update
Comments
js...@gmail.com <js...@gmail.com>
ja...@gmail.com <ja...@gmail.com> #2
My first priority is to resolve this issue. However, there are cases where I would need to keep the old Exif tag data (geotag, time, etc.), and I'd prefer not to have to keep the whole old image. Posted as separate issue 4133 ; but related here.
Description
user-submitted images before putting an object into Datastore.
On a fully-controlled server environment I would optimize images using
jpegtran or pngcrush to only store data relevant to image pixels. I would
also like such a tool to scrub out non-pixel data that could potentially
harm third parties.
Yahoo!'s performance site mentions some of the desired steps for image
optimization for the web:
I can currently pass a bytestring to Image and output as JPG.
"""
from google.appengine.api import images
img = images.rotate(image_data=request.FILES["headshot"].read(), degrees=0,
output_encoding=images.JPEG)
"""
I imagine a new function I will call optimize:
"""
from google.appengine.api import images
img = images.optimize(image_data=request.FILES["headshot"].read(),
output_encoding=images.JPEG)
"""
A bit like I'm Feeling Lucky without altering the displayed image.