How to use the autorotate plugin in ImageResizer

后端 未结 1 1218
死守一世寂寞
死守一世寂寞 2021-01-13 04:35

How do I use the AutoRotate plugin in a c# console application? I thought I\'d be able to do something like settings.AutoRotate = true; like I can change the fi

1条回答
  •  北海茫月
    2021-01-13 05:10

    After a lot of research, I've found the error that I'm making, and reveals a nice little "hidden feature" of .Net!

    When an image is read into the Bitmap object, the meta data is erased, so, by accepting an Image object, the data about the orientation is lost and auto rotate doesn't kick in. So, passing the image filename instead of the image object, and my code above above works!

    Thanks guys!

    0 讨论(0)
提交回复
热议问题