printdotio / printio-api

Issues + wiki for the api. See http://print.io/api
0 stars 0 forks source link

RE: Issue with size of final Image for 11oz Mugs and Canvas Black Wrap 11x14 #37

Open djeet opened 9 years ago

djeet commented 9 years ago

Last issue: https://github.com/printdotio/printio-api/issues/34 When i passed the Maxwidth to 5000. It returned me image of 2940 x 1155 px instead of 2475x1155px .

Request JSON: {"Sku":"Mug-11oz","Template":"Single","Images":[{"LayerId":"AF2F1","Image":{"Url":"http:\/\/bakingcode.org\/print_io\/final_multiple.png","MaxFit":0,"X1":0,"X2":2475,"Y1":-73,"Y2":1155}}],"MaxHeight":"1155","MaxWidth":"5000"}

Response : stdClass Object ( [Url] => http://cdn.print.io/img-manip/7dd20460d3fafc0d23c467aca3847c93.png [HadError] => )

Please provide me the dimensions on which the API will return me final image of 2475x1155px.

djeet commented 9 years ago

Hi @micahasmith can you look at this today.Thanks

micahasmith commented 9 years ago

@djeet if it returned you 2940 x 1155, then it means that its not possible to return an image of size 2475x1155px without breaking aspect ratio

micahasmith commented 9 years ago

im interested in hearing about your use case for using an image that large btw--

djeet commented 9 years ago

@micahasmith In our application we allow user to set his image to the template of products. Then we take user's actual image (Huge in dimension), crop it to the area he selected & then pass it to printIO API to return us the final preview image, so that it can be used while placing order.

For almost all the products this algorithm is working fine & we're having no issues with final image size. But for mug cases API continuously returning wrong image dimensions. Also i have tried modifying the input image for API's preview call, but the image size remains same.
http://screencloud.net/v/g6FJ You can see this error at my order panel.