Search code examples
c#asp.net-mvcbackload

Why BlackCity/Backload automatially rotate the uploaded image?


I'm using backload ( https://github.com/blackcity/Backload ) for image upload. It works fine. Here are the 2 lines in the Wev.backload.config

<images width="3072" height="2304" dpi="96" canvasColor="#00ffffff" forceImageType="image/png" resizeMode="ratio" maxFileSize="4194304" />
<thumbnails path="_thumbs" width="192" height="144" dpi="96" canvasColor="#00ffffff" resizeMode="ratio" imageType="image/png" />

However, I found that if upload an image whose width is < its height, the uploaded image will be automatically rotated. For example, the original image is (3072,2304), width 3072, after uploaded, the size becomes (2304,3072). It is rotated automatically.

Is there a way to keep the width/heigh ratio and without rotating it?


Solution

  • it turns out this is a bug in backload. and it is fixed in new package. the detail is on github https://github.com/blackcity/Backload/issues/107#issuecomment-251363262