【问题标题】:how to identity if the image is upside down in c# asp.net如何在c#asp.net中识别图像是否颠倒
【发布时间】:2014-08-26 11:20:17
【问题描述】:

如果我在我的网站上上传颠倒的图像,它将按原样显示。而 Google chrome 会根据我的需要旋转其方向,但在 IE 图像中显示为上传。我们如何识别 .Net 中的图像方向。即图像是否颠倒。

【问题讨论】:

标签: jquery html c#-4.0


【解决方案1】:

您正在寻找 EXIF 数据的方向参数。 有 8 个可能的值:

EXIF Orientation Value    Row #0 is:     Column #0 is:
1                         Top            Left side
2                         Top            Right side
3                         Bottom         Right side
4                         Bottom         Left side
5                         Left side      Top
6                         Right side     Top
7                         Right side     Bottom
8                         Left side      Bottom

http://www.impulseadventure.com/photo/exif-orientation.html

要读取 EXIF 数据,请检查 Nihilogic 的解决方案: http://www.nihilogic.dk/labs/exifjquery/

似乎使用相同解决方案的更简单示例: http://blog.rrikesh.com/demo/jquery-exif.html

【讨论】:

    猜你喜欢
    • 2011-07-01
    • 2015-12-26
    • 2022-08-05
    • 1970-01-01
    • 2016-05-29
    • 2021-12-30
    • 1970-01-01
    • 2013-03-13
    • 2017-05-07
    相关资源
    最近更新 更多