Closed djeet closed 9 years ago
Facing similar issue with Canvas Black Wrap 11x14 Please see this interface http://bakingcode.org/print_io/?function=16&submit=Submit+Query
@djeet are you able to give us the JSON for these instead of the PHP dump?
@micahasmith Here Is Json dump for mugs preview
{"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":300,"Y2":1155}}],"MaxHeight":"1155","MaxWidth":"2475"}
Canvas Wraps Black Wraps 11x14
{"Sku":"CanvsWrp-BlkWrp-11x14","Template":"Single","Images":[{"LayerId":"B9719","Image":{"Url":"http:\/\/dev.myyearstream.com\/dev\/UserPreview\/14389486891438948689.jpg","MaxFit":0,"X1":-450,"X2":4200,"Y1":-450,"Y2":3300}}],"MaxHeight":"3300","MaxWidth":"4200"}
@jconkey Hey can you help get this taken care of?
@djeet for the mugs the image is not going full height because the MaxWidth:2475
is limiting it. Set maxwidth to 5000 and the height will be 1155.
if there are other issues please submit them separately in separate tickets--
I am facing with issue with generation of preview for mug
What PrinIO demands for Mugs11oz. `stdClass Object ( [Options] => Array ( [0] => stdClass Object ( [Spaces] => Array ( [0] => stdClass Object ( [Id] => 619C8 [Index] => 1 [FinalX1] => 516 [FinalX2] => 2991 [FinalY1] => 73 [FinalY2] => 1228 [DefaultRotation] => 0 [Layers] => Array ( [0] => stdClass Object ( [Id] => C9EA7 [Type] => Design [ZIndex] => 0 [X1] => 0 [X2] => 3500 [Y1] => 0 [Y2] => 1375 [BackgroundImageUrl] => https://az412349.vo.msecnd.net/product-mugs/Mug11oz-Backgroundv4.png [IncludeInPrint] => )
)`
--It demands final image to be in dimensions : 2475*1155 / in ratio of 2.1428;
2) What i have tried:
1) When i passed this data, i get Array ( [Sku] => Mug-11oz [Template] => Single [Images] => Array ( [0] => Array ( [LayerId] => AF2F1 [Image] => Array ( [Url] => http://bakingcode.org/print_io/final_multiple.png (2475px X 1155) [MaxFit] => 0 [X1] => 0 [X2] => 2475 [Y1] => 0 [Y2] => 55 )
) Response stdClass Object ( [Url] => http://cdn.print.io/img-manip/c42c77fd17b7bd1cfd3f82fb4461c1d9.png (2475 x 972) [HadError] => ) -- I noticed it is returning 972 height instead if 1155, the difference is 73 px, which is Y1 for the data returned by the api in template call.
2) -- passing Y2 by reducing it to 73 pixels doesn't chnage anything, returned image still has same ratio.
Array ( [Sku] => Mug-11oz [Template] => Single [Images] => Array ( [0] => Array ( [LayerId] => AF2F1 [Image] => Array ( [Url] => http://bakingcode.org/print_io/final_multiple.png [MaxFit] => 0 [X1] => 0 [X2] => 2475 [Y1] => 0 [Y2] => 1155 )
) Response stdClass Object ( [Url] => http://cdn.print.io/img-manip/d2d69ce7fd97e2c8517a376d9862bf21.png (2475 x 972) [HadError] => )
3) -- This time we passed random Y1 but it has no impact on returned image's ratio.
Array ( [Sku] => Mug-11oz [Template] => Single [Images] => Array ( [0] => Array ( [LayerId] => AF2F1 [Image] => Array ( [Url] => http://bakingcode.org/print_io/final_multiple.png [MaxFit] => 0 [X1] => 0 [X2] => 2475 [Y1] => 300 [Y2] => 1155 )
) Response stdClass Object ( [Url] => http://cdn.print.io/img-manip/dff67864011a2c3b053fda7b350ff6d6.png (2475 x 972) [HadError] => )
4) -- This time image has 73 px extra height than preview cases, But the resulting image is of same dimensions (no impact).
Array ( [Sku] => Mug-11oz [Template] => Single [Images] => Array ( [0] => Array ( [LayerId] => AF2F1 [Image] => Array ( [Url] => http://bakingcode.org/print_io/final_multiple.png (2475px X 1228) [MaxFit] => 0 [X1] => 0 [X2] => 2475 [Y1] => 300 [Y2] => 1155 )
) Response stdClass Object ( [Url] => http://cdn.print.io/img-manip/dff67864011a2c3b053fda7b350ff6d6.png [HadError] => )
5) This error (http://screencloud.net/v/tC0h) i got when not passing the "right" image while placing order.
Also why is API returning image of same height 972 px irrespective of how i pass on my image. The height returned should have been 1155 px and 972 px. Can you tell me what step i might me doing wrong?