gpt4 book ai didi

php - 读取 EXIF 并确定闪光灯是否闪光

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:51:31 27 4
gpt4 key购买 nike

我一直在用我的 PHP 脚本读取一些 EXIF 数据。我想确定某个图像是否使用了闪光灯。这是 EXIF 阅读器返回的值

0x0     = No Flash
0x1 = Fired
0x5 = Fired, Return not detected
0x7 = Fired, Return detected
0x8 = On, Did not fire
0x9 = On, Fired
0xd = On, Return not detected
0xf = On, Return detected
0x10 = Off, Did not fire
0x14 = Off, Did not fire, Return not detected
0x18 = Auto, Did not fire
0x19 = Auto, Fired
0x1d = Auto, Fired, Return not detected
0x1f = Auto, Fired, Return detected
0x20 = No flash function
0x30 = Off, No flash function
0x41 = Fired, Red-eye reduction
0x45 = Fired, Red-eye reduction, Return not detected
0x47 = Fired, Red-eye reduction, Return detected
0x49 = On, Red-eye reduction
0x4d = On, Red-eye reduction, Return not detected
0x4f = On, Red-eye reduction, Return detected
0x50 = Off, Red-eye reduction
0x58 = Auto, Did not fire, Red-eye reduction
0x59 = Auto, Fired, Red-eye reduction
0x5d = Auto, Fired, Red-eye reduction, Return not detected
0x5f = Auto, Fired, Red-eye reduction, Return detected

哪些表示已经使用了flash?

最好的问候,姆拉乔

最佳答案

flash 属性实际上是以下标志的组合:

0:  FlashDidNotFire
1: FlashFired
2: StrobeReturnLightDetected
4: StrobeReturnLightNotDetected
8: CompulsoryFlashMode
16: AutoMode
32: NoFlashFunction
64: RedEyeReductionMode

要检查闪光灯是否已触发,请将闪光灯属性与 1 按位进行运算:

$flashfired = ($exifflashproperty & 1) != 0;

关于php - 读取 EXIF 并确定闪光灯是否闪光,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7076958/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com