Open djeet opened 9 years ago
Hi @micahasmith can you look at this today.Thanks
@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
im interested in hearing about your use case for using an image that large btw--
@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.
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.