Open jmathai opened 12 years ago
You're absolutely right—we do need a robust, structured definition of a photo. This photo object would make a good starting point for what a well-known photo attachment annotation would look like.
@berg I like it. A couple questions.
200x200
with cropped: false
means the aspect ratio is maintained? This means the actual dimensions might differ, right?date
field but what about date taken (from exif) and date created or uploaded?Possibly a few more but that's enough for now..
Thanks. Let me respond to your questions in turn:
cropped: false
, the aspect ratio would be maintained, yes. The idea is that the key would reflect the post-crop dimensions. cropped: true
means that the image has been cropped to square (that key could be more accurately named).date
here is intended to be the date taken—i.e., the date from EXIF tags, given that the post surrounding this image will have its own date.That all sounds good to me. Does cropped: true
implying it's a square image? Any reason the aspect ration can't be flexible?
For example..
"200x300": {
"size": 30,
"width": 200,
"height": 300,
"cropped": true,
"rotation": 0,
"url": "http://example.com/photo/200x300.jpg"
},
cropped: true
is supposed to be an easy way for an stream consumer to find a square thumbnail. Does that make sense?
It does and it's probably sufficient. I'm coming from the perspective of a pure photo API when I question if the only cropped ratio should be square.
Just bringing that up in the event you forsee API developers wanting a specific size that's not a square. The way it is now your only options are to get a square or whatever the original aspect ratio is. If that's okay, then I think what you have proposed is good.
I anticipate this system will have a heavy usage on photos.
That being said, we've done a bit of work on this front. We should at least reuse or learn from the photo object we've come up with.
https://github.com/photo/frontend/blob/master/documentation/schemas/Photo.markdown
Happy to discuss why these fields are included.