From 2adbb183c698284e8fefcf0c35738aeff06d6f74 Mon Sep 17 00:00:00 2001 From: Arno Welzel Date: Sun, 10 Mar 2024 02:01:55 +0100 Subject: [PATCH] Revert custom EXIF parser to PHP extension --- README.md | 2 - languages/lightbox-photoswipe-de_DE.mo | Bin 17295 -> 17374 bytes languages/lightbox-photoswipe-de_DE.po | 38 +- languages/lightbox-photoswipe-de_DE_formal.mo | Bin 17339 -> 17427 bytes languages/lightbox-photoswipe-de_DE_formal.po | 34 +- languages/lightbox-photoswipe-fr_FR.mo | Bin 17802 -> 17892 bytes languages/lightbox-photoswipe-fr_FR.po | 34 +- languages/lightbox-photoswipe-it_IT.mo | Bin 17638 -> 17737 bytes languages/lightbox-photoswipe-it_IT.po | 34 +- languages/lightbox-photoswipe.pot | 30 +- lightbox-photoswipe.php | 2 +- readme.txt | 6 +- src/LightboxPhotoSwipe/ExifHelper.php | 69 +-- src/LightboxPhotoSwipe/ExifParser.php | 584 ------------------ src/LightboxPhotoSwipe/LightboxPhotoSwipe.php | 2 +- templates/options-tab1.inc.php | 1 - templates/options-tab4.inc.php | 1 + 17 files changed, 101 insertions(+), 736 deletions(-) delete mode 100644 src/LightboxPhotoSwipe/ExifParser.php diff --git a/README.md b/README.md index b46b6c3..f194127 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,6 @@ This plugin integrates an extended version of PhotoSwipe 4 or the official relea More about PhotoSwipe see here: [http://photoswipe.com](http://photoswipe.com) -Displaying EXIF data in captions is supported for WEBP and JPEG images and does not require the PHP EXIF extension. - For more information about how to install Lightbox with PhotoSwipe see the [WordPress plugin repository](https://wordpress.org/plugins/lightbox-photoswipe/). ## Custom styles for PhotoSwipe 5 diff --git a/languages/lightbox-photoswipe-de_DE.mo b/languages/lightbox-photoswipe-de_DE.mo index 57b936a67c564a078ba85e6ef0810610090a3c13..f410060161e6877c92a13b59a5a6a0332fa295d8 100644 GIT binary patch delta 2336 zcmY+_e@xVM9LMpup5h@Wg2;(K@JO(T?l=`t(FiT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qHW7A7x;fPb^ zhPJt(#QRyd)AEa*rf6V3fYTej2HyC&7E}i#t$aNZ%N#tsj8za`h_@(plZSlO$-P6~P{~tP" +"the PHP EXIF extension is missing on this server!" +msgstr "" +"" +"die PHP-EXIF-Erweiterung fehlt auf diesem Server!" #: templates/options-tab2.inc.php:75 msgid "" @@ -137,15 +145,15 @@ msgstr "Deaktivieren" msgid "Download image" msgstr "Herunterladen" -#: templates/options-tab4.inc.php:29 +#: templates/options-tab4.inc.php:30 msgid "dynamic, aside" msgstr "dynamisch, daneben" -#: templates/options-tab4.inc.php:29 +#: templates/options-tab4.inc.php:30 msgid "dynamic, automatic" msgstr "dynamisch, automatisch" -#: templates/options-tab4.inc.php:29 +#: templates/options-tab4.inc.php:30 msgid "dynamic, below" msgstr "dynamisch, darunter" @@ -183,17 +191,11 @@ msgstr "Ausgeschlossene Seiten/Beiträge" msgid "Excluded post types" msgstr "Ausgeschlossene Post-Typen" -#: templates/options-tab4.inc.php:20 +#: templates/options-tab4.inc.php:20 templates/options-tab4.inc.php:21 #| msgid "Show EXIF data if available" msgid "EXIF data if available" msgstr "EXIF-Daten, wenn vorhanden" -#: templates/options-tab1.inc.php:43 -msgid "EXIF data in captions is currently supported for JPEG and WEBP images." -msgstr "" -"EXIF-Daten in Bildunterschriften werden derzeit für JPEG- und WEBP-Bilder " -"unterstützt." - #: templates/options-tab2.inc.php:74 msgid "Factor by which SVG images get scaled when displayed in the lightbox." msgstr "" @@ -221,7 +223,7 @@ msgstr "" "Links zu skalierten Bildern korrigieren (z.B. \"image-scaled.jpg\" statt " "\"image.jpg\")" -#: templates/options-tab1.inc.php:45 +#: templates/options-tab1.inc.php:44 msgid "For documentation about hooks, styling etc. please see FAQ" msgstr "Für eine Dokumentation zu Hooks, Styling etc. siehe die FAQ" @@ -333,7 +335,7 @@ msgstr "Links zu Bildern auf anderen Websites ignorieren" msgid "Ignore links to images which contain a hash (#)" msgstr "Links zu Bildern ignorieren, die ein Hash (#) enthalten" -#: templates/options-tab1.inc.php:44 +#: templates/options-tab1.inc.php:43 msgid "" "Image information like size, EXIF data, name of the preview image is cached " "as WordPress transients. To improve performance with large image galleries " @@ -432,7 +434,7 @@ msgstr "Original mit festem Hintergrund" msgid "Other options" msgstr "Weitere Optionen" -#: templates/options-tab4.inc.php:29 +#: templates/options-tab4.inc.php:30 msgid "overlay" msgstr "Overlay" @@ -533,7 +535,7 @@ msgstr "Freigabeoptionen werden für PhotoSwipe 5 noch nicht unterstützt." msgid "Show caption if available" msgstr "Bildunterschrift anzeigen, wenn verfügbar" -#: templates/options-tab4.inc.php:21 +#: templates/options-tab4.inc.php:22 msgid "Show date in EXIF data if available" msgstr "Datum in den EXIF-Daten anzeigen, wenn vorhanden" @@ -667,7 +669,7 @@ msgstr "oben" msgid "Tweet" msgstr "Tweet" -#: templates/options-tab4.inc.php:26 +#: templates/options-tab4.inc.php:27 msgid "Type of caption" msgstr "Art der Beschriftung" diff --git a/languages/lightbox-photoswipe-de_DE_formal.mo b/languages/lightbox-photoswipe-de_DE_formal.mo index 2f7df8c0d05a5f905d4a3f12d6916221f0e8bb2a..1356bb8b56ad09e43814253b46edaa40dc2950a0 100644 GIT binary patch delta 2299 zcmY+_eN2^Q7{~DoP&~vjK=5D&bO^AH#j9exsHp*=gb}85wVb4fAW-bY0aEJB*|ZY3 z#+m++n=A%fmUG!@ww22^-5e{8t=e?Ba{f`RoFj3COGkN zt9^0NcjDg9kL)tDH$7&fcni~UD9J1pW0;I*F&D>i4&K1~aprwy46zK1k2A~0PGUcU zX5j(U`-7-?j_{`hKgLIJBH1GMCQ9%+9p<1G&Ot3yjGAbb`+kiZZ*bj&N~9Hi7{+28 za6N_35nsb0Tt1s*@n_UVr)EdYYH7@3md)6RYw$Q$;Vs<3&K9Sb9U~qkJ5{1N%}J~q zn~D3e5x++zl1=tqxEK#Jegt14Ucu@Gcm$Q`*$9mcI^0B(vLr^&z)YNnS;$x`#|>DI zs?ZQ7;-|O-zd)w2>!|k$nPv+x1349|##g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V()g>uCu;AYcJ=}47Jq?xIDonvDcmG3ja8uDem` zDsdePc)oydY!Y!W*E{Q7sLQn*br-s@9^XY(Zu$c6D08ud*e#@yM56_j=p|&6_6Cl_ zFHx6s0ON2yW#U5H2GkL?VFK<)Ri+!K;ThBd1~7|-{)1zQGbpc)BnKJqS`iK1(&dimM?8qvaV8!p@+xv34-j8M?Q|0d-irHiB&PB4ce7&$4-GGJb=~`zO}vg<sn#GM$A zT~Uvq-aC%%2QxBz)8j+K%PPy4I5obA&j~a-)xJ<95NvF60!>bJb2#j8jMQ&&nwmqQ zU^wEhacYBMXIVwrQpeX=" +"the PHP EXIF extension is missing on this server!" +msgstr "" +"" +"die PHP-EXIF-Erweiterung fehlt auf diesem Server!" + #: templates/options-tab2.inc.php:75 msgid "" "@%emzyua`F`}6tS zz<$>+`(5w*BX647ZnxPO-o#8CO)*Qu7%sr`=)+0Oz(4U$oOg#AuUHl)xXki#2Xikk zCF4QV{XtZm5&i}76D-E*1s3@)P@>0qAOrQ`C8!UrLItXd->-|$H^+S*l}IaQV>hnC z198t{BlACS6xXMcEM7$wI+q$Tt7ec)lx$^2t7gr8vy{ALDb(H}Lf$96=>|KEfc22W}uqSqg6_VGiDfdC0rA1~+3Z zszakVA181vo<>604C;Pjj@eSoLRQ5p@KvlqEy*cdf|0Kn=);#$YxEo5gLAkTGs!|9 zT7j$838X2uotwJ;I%@tFD)ED;gb(3r9K&UJ8TDMk-Rv7oN17F}90pqB06u^v_yo2g z@7Nbuh?7Whb^}%Ef?S?OFXm$tDuFPnwcV%=j^PlVLlw3u&ndVYd-%TXWk5{(2iq}+ zXv%OeHc@duMwwrsU%DP9$|Br_njb*6haJKOJcgAxhwHG!>wK^swKTm*b8P^Bh%h+D zpbua3Ie}(SmE1xtNn(N1>V>ElW}{kM6rY#H?>~m>%#(OOzJ!W1gzCgFs?(pNmhLP@ zRKd3l6!-!r;uLbk?MmG1sOM(!I34*52bhoe&A!G!kr~~!Ur`mh*m+7k1MkBnsOuY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K$Rhkb+3 z;23I!Eo9w5#jV&!JVd{Ay@o98iq)gyHk^d*xDGq94$tBeyoKs;rQ>eR3Z#kl7>*T(Nt9GO9C$xCqNod3>l&Y(sTAfy%cZ z6RO}4110XqarhqcN!w7$Pf^dE!6A>?c|1cLoMT2;&Fgh5t4A$(13rLTQrCM?3qFQA ze4n7s(kUk2qgN?4AHm!nSe<2V7ILlv|S zRq1P}g&jt1-5|2d_C+cE4>0(J3(K)?9)I<4FGle@{1t2FyJsZtez)Rs40630_uyx# zcrj(KCw>$AsqiNLNZeCqMhe@^$;`wT@dZ4TV9?EA66H~x^`Oqe$M_!!=5xeD#Pevw zVjRF~{2sfwpUy=c-dzv5d)<%P>(^1&PofGLMm{WCTIqIV6E+biwld&=+Xtu@zeRS# zuA)wDMwNT|^D#rup%NugEgr@!yo?+NyN;OT zE<`XNyRj7yqE7Ku%)zOYtrxwRhh?a}UV&?|8GU#JIiGe5sljH|xZnLoRG~Yt4g0ZF z-~SB;`b_d_X%9}v8MqnW#%|QsOz z(iIQ*oo$gWr)gc|D#sW0J8g{(>zrVxZ+jqCmh7GQXMRTc5@%s$^`fd|Pf498xz^h> zzOp$GbNrET_`(SWskz7>A_`qNu{{v>Gm1sRamUvY?+%1Qflemv8?BsHpl96l?wo=6 Nohi$b1M^yD{tw=yC6@pI diff --git a/languages/lightbox-photoswipe-fr_FR.po b/languages/lightbox-photoswipe-fr_FR.po index 4d4b951..14fbf3c 100644 --- a/languages/lightbox-photoswipe-fr_FR.po +++ b/languages/lightbox-photoswipe-fr_FR.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: Lightbox with PhotoSwipe\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-06-13 09:32+0000\n" -"PO-Revision-Date: 2024-03-09 16:27+0000\n" +"PO-Revision-Date: 2024-03-10 01:00+0000\n" "Last-Translator: \n" "Language-Team: French (France)\n" "Language: fr_FR\n" @@ -14,6 +14,14 @@ msgstr "" "X-Generator: Loco https://localise.biz/\n" "X-Loco-Version: 2.6.4; wp-6.2-RC2-55551" +#: templates/options-tab4.inc.php:21 +msgid "" +"" +"the PHP EXIF extension is missing on this server!" +msgstr "" +"" +"l'extension PHP EXIF ​​​​ est manquante sur ce serveur !" + #: templates/options-tab2.inc.php:75 msgid "" "pKil~@v#sqwjM-)^piBV6D<%Vf% z5>&cixmYcu;ht_IsTUCgFLE#ozEwoIcZxDK-zo!^{$J4}FJ8 zGw>MdeJ^UAe*VkCcQ73N$!J)BgnraNR6|#R=3#CuarCN@>hsl^s})Tkt(Bz$x6v&T?j(y-RIM8&cHm(#s@Hf z%&`wK8P6k|vzw@$MlE72I+%c!r~vk%Qrm{g;2`$lXQ+)mw%FZp8y@8Q)3NE z#h`ZZB@Hb+h7mZ9TyeYXc@;J82EIW?{=hE!ucnxNf{Rn#qZvoe)P6+;9!3S~p3g#M zEEko5t*DyYo<{ylSa3HF26-^VXjSVYRE(@fuC4`8scgq$97ff~4dhsDW(IYDX~9!K#{7AT>__tG!m zF6H9es1HnF2k#Sd-0FXYmpbbYP#YRS2QOeN-o*JBSmU035VcP5FbxXdzCsG!uAr`! z?xG@Hg(}iwjKt4Tm)Vu=Or#43!UzYDdK7SxBku?+jL94FAhbEqGVKGgLaL#6Hq)Y<=qiaebBX<;AgmoEmjP7-QfhG!0H zUU6y9A>Y!-+UDlQmHvZ)`kphsxaigfzf-ZP!YSRhd1KGGFC*0H>x~F)i@p)(%g%DL zvI=tZLlwz+VbOus%>T_S+LP{YY4ta?1e%-tx2HQ-o_*oJf2>)US+maBThmlmq5ShK5phObgXzbS?T9ye${( delta 2353 zcmXZc4QQ2B9LMqh&6jOCQ>V^%ede60$5w2Jy+x=sk<1d>Ld#xE6h~NCK`)X?!utO9Tp0VD|MNWOf6n=zbMCp9 zeb?K4uT671&FqD2vyoVsV>TR1aR}C80oGw2K8N>UJJQA8#JhZE2QW%}=x(zt96@Kj zABV~_m49=v81Ka=QF*oxF}MGNJv`9BZ=(iEqY|A({;VexU&`2vN^k@7@is2T;kjn_ zV?)O6xRUrI+>bd!%|_uns0DWobxhRidJ#rY6MfaCF^UgPA#<>AMw<=9UL1=*qbj1T zt6?OnQX6nEwqgLcA}Q=R>U|GR$E(P$*x)hr!4asf*@BbNZKI)q4ku7a2#Gi z4fHSiRSBdR=I5oJSEAx2sEMyZO?VypF^Mzq5bC>b9E6vV;<(mJLwkJ_OYsgqiu1;M z6L=8|i93+R*eTRXzs0%uD^9{m6TAtOqe@$Ws$dfLU^{AI&O~p)6}XA3k3BAp z7>zBspukIX997D5s4eM1mHHB@gx63d{v#6)nCiXHLse!RmS8a|PY_j!CRC+eRKD%# zY6UxJDDiF_fCrH)ZHF@+MSXV?5BSVZ<4NMsG;d3$6!q_=1yB>NMcwl{RHe3{4&_c% zB@SXGd5#uQ|4tsv* z$K2Uw4`T{!6_l zzChjEA8@=nEa3MXOOW$o-Kg*W!8B&^@f19XIs-qV780he+WQT7gt%{^SMnnj-b6mY zK|KE+^Hka^G*;uENN%fLA6ZWAhw~w-^LdQ_2ybD$8 z^QiupP~ZKQ(O1Pb>U!kU(2L2a9}Yk28a81eK8xD>H&8R*k4oH$!|**+o-S0svl-8$ z`dzNt^?dfMw38DXP`zf!Vy7{f3ObRv6AC6%kwm=3iL^MOjm^#Bcq+QtY1x=eCYn>> zMyDy!>?~bTUE>7fjZQ;#hDDiMK8g?2Zjlq^sFd7LvEs1!-38qpTgV7j6@xU8NJ(A&Ohp!_s28hHX-mu~R ML5tI$&D=KOf8G5sg#Z8m diff --git a/languages/lightbox-photoswipe-it_IT.po b/languages/lightbox-photoswipe-it_IT.po index e65b1cf..39c362f 100644 --- a/languages/lightbox-photoswipe-it_IT.po +++ b/languages/lightbox-photoswipe-it_IT.po @@ -3,7 +3,7 @@ msgstr "" "Project-Id-Version: Lightbox with PhotoSwipe\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2020-07-28 15:59+0000\n" -"PO-Revision-Date: 2024-03-09 16:26+0000\n" +"PO-Revision-Date: 2024-03-10 00:58+0000\n" "Last-Translator: Arno Welzel\n" "Language-Team: Italian\n" "MIME-Version: 1.0\n" @@ -14,6 +14,14 @@ msgstr "" "X-Generator: Loco https://localise.biz/\n" "X-Loco-Version: 2.6.2; wp-6.0" +#: templates/options-tab4.inc.php:21 +msgid "" +"" +"the PHP EXIF extension is missing on this server!" +msgstr "" +"" +"l'estensione EXIF ​​​​PHP manca su questo server!" + #: templates/options-tab2.inc.php:75 msgid "" "\n" "Language-Team: \n" @@ -14,6 +14,12 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Loco https://localise.biz/" +#: templates/options-tab4.inc.php:21 +msgid "" +"" +"the PHP EXIF extension is missing on this server!" +msgstr "" + #: templates/options-tab2.inc.php:75 msgid "" "exifData = false; - $rawExifData = false; - $content = @file_get_contents($file); - if (!$content) { - return false; - } - if (in_array($extension, ['jpg', 'jpeg', 'jpe'])) { - $data = bin2hex(substr($content, 0, 2)); - if ($data !== 'ffd8') { - return false; - } - $data = bin2hex(substr($content, 2, 2)); - $size = hexdec(bin2hex(substr($content, 4, 2))); - $pos = 6; - $maxPos = strlen($content) - 4; - while($pos < $maxPos && $data != 'ffe1' && $data != 'ffc0' && $data != 'ffd9') { - switch($data) { - case 'ffe0': // JFIF marker - case 'ffed': // IPTC Marker - case 'ffe2': // EXIF extension - case 'fffe': // COM extension Marker - if ($size-2 > 0) { - $pos += $size-2; - } - break; - } - $data = bin2hex(substr($content, $pos, 2)); - $pos += 2; - $size = bin2hex(substr($content, $pos, 2)); - $pos += 2; - } - if ('ffe1' === $data) { - $pos += 6; - $rawExifData = substr($content, $pos, hexdec($size)); - } - } else if ('webp' === $extension) { - $header = substr($content, 0, 12); - if ('RIFF' !== substr($header, 0, 4)) { - return false; - } - if ('WEBP' !== substr($header, 8, 4)) { - return false; - } - $pos = 12; - do { - $chunkType = substr($content, $pos, 4); - $pos += 4; - if ($chunkType) { - $size = unpack('Vsize', substr($content, $pos, 4)); - $pos += 4; - $size = $size['size']; - $payload = substr($content, $pos, $size); - $pos += $size; - if ($size & 1) { - $pos++; - } - if ('EXIF' === $chunkType) { - $rawExifData = $payload; - } - } - } while($chunkType && !$rawExifData); + if (function_exists('exif_read_data')) { + $this->exifData = @exif_read_data($file, 'EXIF', true); } - if ($rawExifData) { - $exitParser = new ExifParser(); - $this->exifData = $exitParser->parse($rawExifData); + if($this->exifData) { + return true; } - return $this->exifData; + return false; } /** diff --git a/src/LightboxPhotoSwipe/ExifParser.php b/src/LightboxPhotoSwipe/ExifParser.php deleted file mode 100644 index 661abbb..0000000 --- a/src/LightboxPhotoSwipe/ExifParser.php +++ /dev/null @@ -1,584 +0,0 @@ -binaryData = $binaryData; - $this->exifData = []; - $this->position = 0; - $this->formatIntel = true; - $header = $this->fetchBytes(2); - - // Analyze header - if($header==="II") { - $this->formatIntel = true; - } else if($header==="MM") { - $this->formatIntel = false; - } - $tag = bin2hex($this->fetchBytes(2)); - $offset = $this->getHexValue($this->fetchBytes(4)); - $offset = hexdec($offset); - if ($offset > 100000) { - return false; - } - if ($offset > 8) { - $this->position += ($offset - 8); - } - - $numTags = hexdec($this->getHexValue($this->fetchBytes(2))); - if ($numTags > 1000) { - return false; - } - $offsetEXIF = false; - - for ($tag = 0; $tag < $numTags; $tag++) { - $entry = $this->readEntry(); - if ($entry['tagName'] === 'Exif_IFD_Pointer') { - $offsetEXIF = $entry['value']; - } else if ($entry['tagName'] !== 'GPS_IFD_Pointer') { - $this->exifData['IFD0'][$entry['tagName']] = $entry['value']; - } - } - - if ($offsetEXIF) { - $this->position = $offsetEXIF; - $numTags = hexdec($this->getHexValue($this->fetchBytes(2))); - if ($numTags > 1000) { - return false; - } - - for ($tag = 0; $tag < $numTags; $tag++) { - $entry = $this->readEntry(); - $this->exifData['EXIF'][$entry['tagName']] = $entry['value']; - } - } - - return $this->exifData; - } - - /** - * Fetch a number of bytes from the binary data buffer - */ - private function fetchBytes($count) - { - if (strlen($this->binaryData) >= $this->position + $count) { - $result = substr($this->binaryData, $this->position, $count); - $this->position += $count; - } else { - $result = false; - } - - return $result; - } - - /** - * Get hex string for binary data - */ - function getHexValue($data) - { - $value = bin2hex($data); - if ($this->formatIntel) { - $len = strlen($value); - $reversed = ''; - for($i=0; $i<=$len; $i+=2) { - $reversed .= substr($value,$len-$i,2); - } - $value = $reversed; - } - return $value; - } - - /** - * Read data entry at the current position from the binary data buffer - */ - private function readEntry() - { - $tag = $this->getHexValue($this->fetchBytes(2)); - $tagName = $this->getTagName($tag); - - $typeId = $this->getHexValue($this->fetchBytes(2)); - $size = 0; - $this->getType($typeId, $type, $size); - - $count = $this->getHexValue($this->fetchBytes(4)); - $bytesofdata = $size * hexdec($count); - - $value = $this->fetchBytes(4); - $data = false; - - if ($bytesofdata <= 4) { - $data = $value; - } else if ($bytesofdata < 100000) { - $offset = hexdec($this->getHexValue($value)); - $data = substr($this->binaryData, $offset, $bytesofdata); - } else { - return; - } - - return [ - 'tagName' => $tagName, - 'value' => $this->formatData($type, $tag, $data), - ]; - } - - /** - * Get EXIF datatype and length for given ID - */ - private function getType($typeId, &$type, &$size) { - switch($typeId) { - case "0001": - $type = "UBYTE"; - $size = 1; - break; - case "0002": - $type = "ASCII"; - $size = 1; - break; - case "0003": - $type = "USHORT"; - $size = 2; - break; - case "0004": - $type = "ULONG"; - $size = 4; - break; - case "0005": - $type = "URATIONAL"; - $size = 8; - break; - case "0006": - $type = "SBYTE"; - $size = 1; - break; - case "0007": - $type = "UNDEFINED"; - $size = 1; - break; - case "0008": - $type = "SSHORT"; - $size=2; - break; - case "0009": - $type = "SLONG"; - $size = 4; - break; - case "000a": - $type = "SRATIONAL"; - $size = 8; - break; - case "000b": - $type = "FLOAT"; - $size = 4; - break; - case "000c": - $type = "DOUBLE"; - $size = 8; - break; - default: - $type = "UNKNOWN-".$typeId; - $size = 0; - break; - } - return $type; - } - - - function getTagName($tag) { - $tagNames = [ - '0001' => 'InteroperabilityIndex', - '0002' => 'InteroperabilityVersion', - '000b' => 'ACDComment', - '00fe' => 'ImageType', - '00ff' => 'SubfileType', - '0100' => 'ImageWidth', - '0101' => 'ImageLength', - '0102' => 'BitsPerSample', - '0103' => 'Compression', - '0106' => 'PhotometricInterpretation', - '010e' => 'ImageDescription', - '010f' => 'Make', - '0110' => 'Model', - '0111' => 'StripOffsets', - '0112' => 'Orientation', - '0116' => 'RowsPerStrip', - '0117' => 'StripByteCounts', - '0115' => 'SamplesPerPixel', - '011a' => 'XResolution', - '011b' => 'YResolution', - '011c' => 'PlanarConfiguration', - '0128' => 'ResolutionUnit', - '012d' => 'TransferFunction', - '0131' => 'Software', - '0132' => 'DateTime', - '013b' => 'Artist', - '013c' => 'HostComputer', - '013d' => 'Predictor', - '013e' => 'WhitePoint', - '013f' => 'PrimaryChromaticities', - '0142' => 'TileWidth', - '0143' => 'TileLength', - '0144' => 'TileOffsets', - '0145' => 'TileByteCounts', - '014a' => 'SubIFDs', - '015b' => 'JPEGTables', - '0201' => 'JpegIFOffset', - '0202' => 'JpegIFByteCount', - '0212' => 'YCbCrSubSampling', - '0211' => 'YCbCrCoefficients', - '0213' => 'YCbCrPositioning', - '0214' => 'ReferenceBlackWhite', - '1000' => 'RelatedImageFileFormat', - '1001' => 'RelatedImageWidth', - '1002' => 'RelatedImageLength', - '828d' => 'CFARepeatPatternDim', - '828e' => 'CFAPattern', - '828f' => 'BatteryLevel', - '8298' => 'Copyright', - '829a' => 'ExposureTime', - '829d' => 'FNumber', - '83bb' => 'IPTC/NAA', - '8649' => 'PhotoshopSettings', - '8769' => 'Exif_IFD_Pointer', - '8822' => 'ExposureProgram', - '8824' => 'SpectralSensitivity', - '8825' => 'GPS_IFD_Pointer', - '8827' => 'ISOSpeedRatings', - '8773' => 'InterColorProfile', - '8828' => 'OECF', - '8829' => 'Interlace', - '882a' => 'TimeZoneOffset', - '882b' => 'SelfTimerMode', - '9000' => 'ExifVersion', - '9003' => 'DateTimeOriginal', - '9004' => 'DateTimedigitized', - '9101' => 'ComponentsConfiguration', - '9102' => 'CompressedBitsPerPixel', - '9201' => 'ShutterSpeedValue', - '9202' => 'ApertureValue', - '9203' => 'BrightnessValue', - '9204' => 'ExposureBiasValue', - '9205' => 'MaxApertureValue', - '9206' => 'SubjectDistance', - '9207' => 'MeteringMode', - '9208' => 'LightSource', - '9209' => 'Flash', - '920a' => 'FocalLength', - '920b' => 'FlashEnergy', - '920c' => 'SpatialFrequencyResponse', - '920d' => 'Noise', - '9211' => 'ImageNumber', - '9212' => 'SecurityClassification', - '9213' => 'ImageHistory', - '9214' => 'SubjectLocation', - '9215' => 'ExposureIndex', - '9216' => 'TIFF/EPStandardID', - '927c' => 'MakerNote', - '9286' => 'UserComment', - '9290' => 'SubsecTime', - '9291' => 'SubsecTimeOriginal', - '9292' => 'SubsecTimeDigitized', - 'a000' => 'FlashPixVersion', - 'a001' => 'ColorSpace', - 'a002' => 'ExifImageWidth', - 'a003' => 'ExifImageHeight', - 'a004' => 'RelatedSoundFile', - 'a005' => 'ExifInteroperabilityOffset', - 'a20c' => 'SpacialFreqResponse', - 'a20b' => 'FlashEnergy', - 'a20e' => 'FocalPlaneXResolution', - 'a20f' => 'FocalPlaneYResolution', - 'a210' => 'FocalPlaneResolutionUnit', - 'a214' => 'SubjectLocation', - 'a215' => 'ExposureIndex', - 'a217' => 'SensingMethod', - 'a300' => 'FileSource', - 'a301' => 'SceneType', - 'a302' => 'CFAPattern', - 'a401' => 'CustomerRender', - 'a402' => 'ExposureMode', - 'a403' => 'WhiteBalance', - 'a404' => 'DigitalZoomRatio', - 'a406' => 'SceneCaptureMode', - 'a407' => 'GainControl', - 'a408' => 'Contrast', - 'a409' => 'Saturation', - 'a40a' => 'Sharpness', - ]; - - if (isset($tagNames[$tag])) { - return $tagNames[$tag]; - } - - return false; - } - - private function formatData($type, $tag, $data) { - if('ASCII' === $type) { - // Make sure there are no unwanted leading or trailing spaces or null bytes - $data = trim($data); - } else if('URATIONAL' === $type || 'SRATIONAL' == $type) { - $data = $this->getHexValue($data); - - if ($this->formatIntel) { - $top = hexdec(substr($data, 8, 8)); - } else { - $top = hexdec(substr($data, 0, 8)); - } - - if($this->formatIntel) { - $bottom = hexdec(substr($data,0,8)); - } - else { - $bottom = hexdec(substr($data,8,8)); - } - - if ('SRATIONAL' === $type && $top>2147483647) { - // This is a signed value - $top = $top - 4294967296; - } - if(0 !== $bottom ) { - $data = $top / $bottom; - } - else if(0 === $top) { - $data = 0; - } - else { - $data = $top."/".$bottom; - } - - if (('011a' === $tag || '011b' == $tag) && $bottom==1) { - // XResolution YResolution - $data = $top; - } else if ('829a' === $tag) { - // Exposure Time - if($top/10 == 1) { - $data = "1/".round($bottom / 10, 0); - } else { - $data = $top."/".$bottom; - } - } else if('829d' === $tag) { - // FNumber - } else if('9204' === $tag) { - // ExposureBiasValue - } else if('9205' === $tag || '9202' === $tag) { - // ApertureValue and MaxApertureValue - $data = exp(($data * log(2)) / 2); - $data = round($data, 1); - } else if($tag=="920a") { - // FocalLength - } else if($tag=="9201") { - // ShutterSpeedValue - $data = exp($data * log(2)); - if ($data > 1) $data = floor($data); - if ($data > 0) { - $data = 1 / $data; - $nominator = 0; - $denominator = 0; - $this->convertToFraction($data, $nominator, $denominator); - if ($nominator >= 1 && $denominator == 1) $data = $nominator; - else $data = $nominator.'/'.$denominator; - } else { - $data = "b"; - } - } - - } else if (in_array($type, ['USHORT', 'SSHORT', 'ULONG', 'SLONG', 'FLOAT', 'DOUBLE'])) { - $data = $this->getHexValue($data); - if(!$this->formatIntel && ('USHORT' === $type || 'SSHORT' === $type)) { - $data = substr($data,0,4); - } else { - $data = substr($data, 4, 4); - } - $data=hexdec($data); - - if ('SSHORT' === $type && $data > 32767) { - // This is a signed value - $data = $data - 65536; - } - if ('SLONG' === $type && $data > 2147483647) { - // This is a signed value - $data = $data - 4294967296; - } - - if ('0112' === $tag) { - // Orientation - // 1 - normal - // 2 - mirrored - // 3 - upsidedown - // 4 - upsidedown mirrored - // 5 - 90 degree clockwise mirrored - // 6 - 90 degree counter clockwise - // 7 - 90 degree counter clockwise mirrored - // 8 - 90 degree clockwise - } else if('0128' === $tag || 'a210' === $tag) { - // ResolutionUnit, FocalPlaneResolutionUnit and ThumbnailResolutionUnit - // 1 - no unit - // 2 - inch - // 3 - centimeter - } else if('0213' === $tag) { - // YCbCrPositioning - // 1 - Center of pixel array - // 2 - Datum point - } else if ('8822' === $tag) { - // ExposureProgram - // 1 - Manual - // 2 - Program - // 3 - Aperature Priority - // 4 - Shutter Priority - // 5 - Program Creative - // 6 - Program Action - // 7 - Portrat - // 8 - Landscape - } else if ('9207' === $tag) { - // MeteringMode - // 0 - Unkown - // 1 - Average - // 2 - Center Weighted Average - // 3 - Spot - // 4 - Multi-Spot - // 5 - Multi-Segment - // 6 - Partial - // 255 - Other - } else if ('9208' === $tag) { - // LightSource - // 0 - Unknown or Auto - // 1 - Daylight - // 2 - Flourescent - // 3 - Tungsten - // 10 - Flash - // 17 - Standard Light A - // 18 - Standard Light B - // 19 - Standard Light C - // 20 - D55 - // 21 - D65 - // 22 - D75 - // 255 - Other - } else if('9209' === $tag) { - // Flash - // 0 - No flash - // 1 - Flash - // 5 - Flash, strobe return light not detected - // 7 - Flash, strob return light detected - // 9 - Compulsory flash - // 13 - Compulsory flash, return light not detected - // 15 - Compulsory flash, return light detected - // 16 - No flash; - // 24 - No flash; - // 25 - Flash, auto-mode - // 29 - Flash, auto-mode, return light not detected - // 31 - Flash, auto-mode, return light detected - // 32 - No flash - // 65 - Red eye - // 69 - Red eye, return light not detected - // 71 - Red eye, return light detected - // 73 - Red eye, compulsory flash - // 77 - Red eye, compulsory flash, return light not detected - // 79 - Red eye, compulsory flash, return light detected - // 89 - Red eye, auto-mode - // 93 - Red eye, auto-mode, return light not detected - // 95 - Red eye, auto-mode, return light detected - } else if ('a001' === $tag) { - // ColorSpace - // 1 - sRGB - } else if('a002' === $tag || 'a003' === $tag) { - // ExifImageWidth, ExifImageWidthHeight - } else if ('0103' === $tag) { - // Compression - // 1 - No compression - // 6 - JPEG compression - } else if ('a217' === $tag) { - // SensingMethod - // 1 - Not defined - // 2 - One Chip Color Area Sensor - // 3 - Two Chip Color Area Sensor - // 4 - Three Chip Color Area Sensor - // 5 - Color Sequential Area Sensor - // 7 - Trilinear Sensor - // 8 - Color Sequential Linear Sensor - } else if('0106' === $tag) { - // PhotometricInterpretation - // 1 - Monochrome - // 2 - RGB - // 6 - YCbCr - } - - } else if ('UNDEFINED' === $type) { - if('9000' === $tag || 'a000' === $tag || '0002' === $tag) { - // ExifVersion, FlashPixVersion, InteroperabilityVersion - $data = $data / 100; - } - if('a300' === $tag) { - // FileSource - // 0 - None - // 3 - Digital still camera - } - if('a301' === $tag) { - // SceneType - // 0 - None - // 1 - Directly photographed - } - if($tag=="9101") { - // ComponentsConfiguration - // 0 - None - // 1 - Y - // 2 - Cb - // 3 - Cr - // 4 - R - // 5 - G - // 6 - B - } - } else { - $data = $this->getHexValue($data); - } - - return $data; - } - - private function convertToFraction($value, &$nominator, &$denominator) - { - $maxLoops = 15; - $minDenominator = 0.000001; - $maxError = 0.00000001; - - $f = $value; - $nominatorOne = 1; - $denominatorOne = 0; - $nominatorTwo = 0; - $denominatorTwo = 1; - - $loopCount = 0; - while ($loopCount < $maxLoops) - { - $a = floor($f); - $f = $f - $a; - $nominator = $nominatorOne * $a + $nominatorTwo; - $denominator = $denominatorOne * $a + $denominatorTwo; - $nominatorTwo = $nominatorOne; - $denominatorTwo = $denominatorOne; - $nominatorOne = $nominator; - $denominatorOne = $denominator; - - if ($f < $minDenominator) - break; - - if (abs($value - $nominator / $denominator) < $maxError) - break; - - $f = 1 / $f; - $loopCount++; - } - } -} \ No newline at end of file diff --git a/src/LightboxPhotoSwipe/LightboxPhotoSwipe.php b/src/LightboxPhotoSwipe/LightboxPhotoSwipe.php index f788b4e..3e5a174 100644 --- a/src/LightboxPhotoSwipe/LightboxPhotoSwipe.php +++ b/src/LightboxPhotoSwipe/LightboxPhotoSwipe.php @@ -10,7 +10,7 @@ */ class LightboxPhotoSwipe { - const VERSION = '5.2.3'; + const VERSION = '5.2.4'; const SLUG = 'lightbox-photoswipe'; const META_VERSION = '16'; const CACHE_EXPIRE_IMG_DETAILS = 86400; diff --git a/templates/options-tab1.inc.php b/templates/options-tab1.inc.php index 2438334..b0bdec5 100644 --- a/templates/options-tab1.inc.php +++ b/templates/options-tab1.inc.php @@ -40,7 +40,6 @@ 820/1400 * $this->imageSizes[0]['width'], $this->imageSizes[0]['height'] ); ?>

-

Redis Object Cache.', 'lightbox-photoswipe'); ?>

: https://wordpress.org/plugins/lightbox-photoswipe/#faq.

diff --git a/templates/options-tab4.inc.php b/templates/options-tab4.inc.php index b32edc6..a8d4132 100644 --- a/templates/options-tab4.inc.php +++ b/templates/options-tab4.inc.php @@ -18,6 +18,7 @@


+