From 1b70a4c6b5159135dcbfe21e5266fd9e38d949ac Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Fri, 13 Sep 2019 22:36:26 +1000 Subject: [PATCH] Use TIFF orientation --- Tests/images/g4_orientation_1.tif | Bin 0 -> 708 bytes Tests/images/g4_orientation_2.tif | Bin 0 -> 930 bytes Tests/images/g4_orientation_3.tif | Bin 0 -> 926 bytes Tests/images/g4_orientation_4.tif | Bin 0 -> 928 bytes Tests/images/g4_orientation_5.tif | Bin 0 -> 1026 bytes Tests/images/g4_orientation_6.tif | Bin 0 -> 1024 bytes Tests/images/g4_orientation_7.tif | Bin 0 -> 1022 bytes Tests/images/g4_orientation_8.tif | Bin 0 -> 1026 bytes Tests/test_file_libtiff.py | 9 +++++++++ src/PIL/TiffImagePlugin.py | 19 +++++++++++++++++++ 10 files changed, 28 insertions(+) create mode 100755 Tests/images/g4_orientation_1.tif create mode 100755 Tests/images/g4_orientation_2.tif create mode 100755 Tests/images/g4_orientation_3.tif create mode 100755 Tests/images/g4_orientation_4.tif create mode 100755 Tests/images/g4_orientation_5.tif create mode 100755 Tests/images/g4_orientation_6.tif create mode 100755 Tests/images/g4_orientation_7.tif create mode 100755 Tests/images/g4_orientation_8.tif diff --git a/Tests/images/g4_orientation_1.tif b/Tests/images/g4_orientation_1.tif new file mode 100755 index 0000000000000000000000000000000000000000..8ab0f1d0d0204488f2e12f0872a4fdb12a7c28df GIT binary patch literal 708 zcmebD)M9wT$iVRbrburoE>Aok z92kBzyk78^)c5lHtJdxR`+N86iw`|EEKLXs5$Y`T+L*mLVn2uRLMAr14gmv)lMM$H z5*jDBaWur-3{a@Me2AaJL~e%T|IAHO(F z=l=hd>+^@~7aaGpNISBfa&~09;JDdY+5HxW`OCk5U#|B2zJJO5%eD4?Q?Hu)$Cun+ z^&_79%ly{AD*yM(3uN#6xPRaO?>F{_mwt_3-+uV-!~fO4zd3c^cMqz2_1_OHJKSra$pSF_jGujhTZVQb>9U;BR~K5Xj{uwQWa-|PF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}q_==LK#%~$Aa}xO&!V)%ys*sFavJ-O e8E7Xd{%ZkhfcdWn$R^~!DIg1gAOVQ6`wsx!C=o#b literal 0 HcmV?d00001 diff --git a/Tests/images/g4_orientation_4.tif b/Tests/images/g4_orientation_4.tif new file mode 100755 index 0000000000000000000000000000000000000000..166381fb73f0e0dba385f9f39893be35f89bbdb1 GIT binary patch literal 928 zcmebD)M7Zm#K7?X|NqY$4LLPhB7&lfSF}2`IGj5yl%=H5*OKATIKha8M0o)ZH0ar0(4u39$hulj!u8->dsW;p&&w6EK>+-uhQOLhBPzn|FmBwl7Bi(irc zP6hjn&h!78cwZ>oQTU^9i^Ke{6YuX|b#t9BIlg@TR^i|N`l`D1^{>|doBA^TmfzI- zxBTD#`gL!cc<9#+dn>X&T>bAPwf|lFKh31cwJVm^d%r*QFn>9BeE#c$1rg>~#DB&A zTqAGVyovwzNe|n<|Ne-xrf}4Hq`h3flILdl^%gM!pE`l~`~Nu;6}~5G|Jq;Im?2;r z#2R1v`hqT#V&Y$>fBXNmXq<3eds6*`L;gEY`}+%`SmfqAtbY0bkDmBz?%&t{#|p&n ze)Vtt|L6YaW~gnwR`UA&`qB^e?7y=Q{`XzK^=)<7?=5Td-(C8)Z{N15X1lIm&VJZ> zBT=_aD6wfOW1EC$n~;r!5@X+uM19eXZ*r+wp7y%`6HBg*LSK9Bg9axR#P}tg-2vl5)r2{?+^Thu+`+`s)39g_N+a zRcE=D6kOT=``y**+!M;L=D#)hduuKVh~_pU}R=sWME+M z1I98VlpO)&GeOxPIc6xE1;}QDvVlwnE+jRAj4WVtIDq0pNaCVMY%wSsWWG35{dJ%P zQjDx%y~}`ZkcP6?0ogK0dNrVIpfH0WBNGD`klqI306_u}gWL(DJ&V#3^TIMy%W3RC cP literal 0 HcmV?d00001 diff --git a/Tests/images/g4_orientation_5.tif b/Tests/images/g4_orientation_5.tif new file mode 100755 index 0000000000000000000000000000000000000000..9fecaad65c3f7abeaf985dc27277c385f4f387f1 GIT binary patch literal 1026 zcmebD)M8L#W?+~rC@XkP`9BCu2xa>JUwsdltx?eNO3B`eY5o73e!)|o@&!C`JXJJj zxh9a%=;+wsq@<+mHC2Dr|L@=P6|S*--}}Ue$NgW4@`39>-5vizc1p>}C_KFEH~0G@ zi^M(Z{BK{{{{8#^_y51Y>wdj^owrSPeb?@=d2%Ao0jYdkK--bDu9T9oaJ*|GYyIA( z;BbYX{OwECzkmP#{{Q#4zhCcOyPIPjFIu+N#zv!U;S@`!NA~~!E2b+&C={%`YT=t* zyLO7j2zKeF>;a}QGEapG%kdHEzly|3x;rQ6qj-P`*bXz>64 zd-H!^x_|r74I9+Aph|6g~1 z-|k(v*S2RrT6cAMd#k_|N#~}HPd@)Y%`shJRW}c0wew^daOeVw8W(p#K|ukaHG=>D z16BRY=3RAdU&oJGSF8U2|LM1*x2flad*gbrJSc{Mv4a;0%DNzc`=-%Vszy7|izc=mQJ+XriwPoYh2fTHB=ousdl0XFw91IN%0t^g{ z%nXbS3=9!K%m`)sF)=VOLD?WVW+{RFZ~5B2+Wg!- zeR2}3!$b_0!~|J&{3~%OamSA$I^dxH|Koop$_K6k&FeVV)%e*Zw#5Gb@9#GzWHY_5 zK56{_$N&F7)lwb*|NnEPd(lge7rXSj7XgW;3t$u8R);N_`Ty~WAmtTKK0dvU77-=a zR{oUT#WmmS*Xnh@;;;W-|Nr{eZChU!T+!{~EZrJ5BjC`AL;WYCCOYyLYz-Suxf$XCCw{mqYko$qz{&|~HHHm$3zJeuMneT(coX9m>&|8J`FVpotA z#0}jGwkUysb==jJYV|;e{tL^Law#~~Vs$;lr73xeg^rjy*W|?g+y6(`{d@oW|Nplq?Np^8wj1NP0D(Y@l)mLq;YBE+8!iR09GDKn!vx tjP@)_OUw()Of6@it^e47c9P=1XF&JD{PzyXCgi_wKs6wc0L0k+2LOtQPon?; literal 0 HcmV?d00001 diff --git a/Tests/images/g4_orientation_7.tif b/Tests/images/g4_orientation_7.tif new file mode 100755 index 0000000000000000000000000000000000000000..0babc91083fa17d380aa945763fbf8ab38db74d7 GIT binary patch literal 1022 zcmebD)MAihW?=Y_0TjAiOI$>_`8K?~o3|s^C!4kS|NsARdeMtrdfkg&D78;_y;#}-24#C!2W_eU@ky`amCKO@XEh?K zcV%9b{cDjQ_O<+a-TnRl|L@^fbm+gOF*8^Sge{cS^ulKfnS!1KxvHC{96@!3OJ}%`a2dA?C|NkTPVo9vH z>%|g5XOLr#xPX9l+|`v)_J4qS6~de~yc`#BeXlT5c*^G|EA+#bW%8x>e|7)A)Y}g< zd41Gf{m>0pRJ*+X&DzR!MMOfe|Ns9Jo0L~5vOCTS*zmpN@*?YB1^3pzdcW@PexP~v z_4U=>`44YI^LB0jw$_wSLc`+tCl=oHZlGC$K&}8bLpO3l_irs*xZqH`#6O3|H6MYdKC=JB!g}JhK=r-v+RWSQ>;Er( z8MIU(101xw^g131g8g`v1025l|M#E!2#m}md!T*)Ke2G_|Np!KXb6zq&e69>nL&V& zL4bjQk(q&!fq@|ch#8@5KPCnSCMX*u#|&k&0NHF%Hjv4{g``H1kp*lH2T)uHNn8|( zEe2(S%om5MHwCh#7+Jx3S%B$S8p`GYvSpC;YCzdQrAOVQ6`wsvMCR6tS literal 0 HcmV?d00001 diff --git a/Tests/images/g4_orientation_8.tif b/Tests/images/g4_orientation_8.tif new file mode 100755 index 0000000000000000000000000000000000000000..3216a37257714c434f5daec635e17474aefa19cd GIT binary patch literal 1026 zcmebD)M8L#W?-26NO_Ufk^28Y@PtFO{{OiTAm;z4e1ftr?jVtWr;6q**8~y^Pc%Fctuf9vD_|E>4lw{G>W*cD#KZ)Jz_a~+ZtcPSMFTBzV~tz!TG{~zT~ zY-iQb2xz?QzubGlL>U_`{-v*dU;p~I|NpOl(`#eHOLhlL?cZ{3m7HjcK`I}Y^8f#z zGzuI}UbV0)_%^qu?{