Giter Site home page Giter Site logo

Comments (7)

berg avatar berg commented on September 27, 2024

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.

from api-spec.

berg avatar berg commented on September 27, 2024

@jmathai curious if you might give me some feedback on:

https://gist.github.com/3173716

Thanks!

from api-spec.

jmathai avatar jmathai commented on September 27, 2024

@berg I like it. A couple questions.

  1. For the following, 200x200 with cropped: false means the aspect ratio is maintained? This means the actual dimensions might differ, right?
  2. Are you planning on any concept of tracking what app generated the event or object? Is it feasible to have permissions around that as well? i.e. Only grant app A access to content it creates.
  3. How do permissions work. At the least, public and private.
  4. I see a date field but what about date taken (from exif) and date created or uploaded?

Possibly a few more but that's enough for now..

from api-spec.

berg avatar berg commented on September 27, 2024

Thanks. Let me respond to your questions in turn:

  1. With 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).
  2. There will be a link object on the photo, which will have information about the photo's creator and app, if desired. This will allow for a link back to the canonical location of the image. I left that out because I'm still working on defining this link object.
  3. This is an annotation on a post. The post itself determines the public/private nature of the image.
  4. The 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.

from api-spec.

jmathai avatar jmathai commented on September 27, 2024

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"
        },

from api-spec.

berg avatar berg commented on September 27, 2024

cropped: true is supposed to be an easy way for an stream consumer to find a square thumbnail. Does that make sense?

from api-spec.

jmathai avatar jmathai commented on September 27, 2024

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.

from api-spec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.