Snapshot api- crop the white space

Prashant
We are using camera.snapshot() method to get the seenshot of the product configured. but there is lot of white space coming around the product. Client has request the follwoing Crop the photo to show only the product H…

Comments

4 comments

  • Comment author
    Prashant

    We are using camera.snapshot() method to get the seenshot of the product configured. but there is lot of white space coming around the product.

    Client has request the follwoing

    1. Crop the photo to show only the product
    2. High resolution snapshot
    0
  • Comment author
    William Thompson

    Hi Prashant,

    I believe the snapshot service grabs anything in the current viewport but may not take in environmental transparency. Snapshot with white edges:

     

    You can either use a 3rd party library to crop the photo or use our Asset-Jobs API to create a server-side render of the item. This does take environmental transparency into account. Asset jobs version with transparent background:

     

    Finally, you can also pre-render the items on the platform and retrieve them from our layers service by passing in parameters.

    Please let me know if this is helpful!

    0
  • Comment author
    Prashant

    @Will whether asset job API will return in real time.

    0
  • Comment author
    William Thompson

    If you pre-render on the platform and use the layers service it will be a fast response. I believe there are some parameters to turn on cacheing for the asset-job API.

    0

Please sign in to leave a comment.