@@ -102,6 +102,8 @@ describe('Image metadata', function () {
102
102
assert . strictEqual ( false , metadata . hasProfile ) ;
103
103
assert . strictEqual ( false , metadata . hasAlpha ) ;
104
104
assert . strictEqual ( 1 , metadata . orientation ) ;
105
+ assert . strictEqual ( 2464 , metadata . appliedOrientation . width ) ;
106
+ assert . strictEqual ( 3248 , metadata . appliedOrientation . height ) ;
105
107
assert . strictEqual ( 'undefined' , typeof metadata . exif ) ;
106
108
assert . strictEqual ( 'undefined' , typeof metadata . icc ) ;
107
109
assert . strictEqual ( 'inch' , metadata . resolutionUnit ) ;
@@ -148,6 +150,8 @@ describe('Image metadata', function () {
148
150
assert . strictEqual ( false , metadata . hasProfile ) ;
149
151
assert . strictEqual ( false , metadata . hasAlpha ) ;
150
152
assert . strictEqual ( 'undefined' , typeof metadata . orientation ) ;
153
+ assert . strictEqual ( 2809 , metadata . appliedOrientation . width ) ;
154
+ assert . strictEqual ( 2074 , metadata . appliedOrientation . height ) ;
151
155
assert . strictEqual ( 'undefined' , typeof metadata . exif ) ;
152
156
assert . strictEqual ( 'undefined' , typeof metadata . icc ) ;
153
157
done ( ) ;
@@ -218,7 +222,11 @@ describe('Image metadata', function () {
218
222
isPalette : false ,
219
223
isProgressive : false ,
220
224
space : 'b-w' ,
221
- width : 32
225
+ width : 32 ,
226
+ appliedOrientation : {
227
+ width : 32 ,
228
+ height : 32
229
+ }
222
230
} ) ;
223
231
} ) ;
224
232
@@ -239,7 +247,11 @@ describe('Image metadata', function () {
239
247
isPalette : false ,
240
248
isProgressive : false ,
241
249
space : 'grey16' ,
242
- width : 32
250
+ width : 32 ,
251
+ appliedOrientation : {
252
+ width : 32 ,
253
+ height : 32
254
+ }
243
255
} ) ;
244
256
} ) ;
245
257
@@ -601,6 +613,10 @@ describe('Image metadata', function () {
601
613
if ( err ) throw err ;
602
614
assert . strictEqual ( true , metadata . hasProfile ) ;
603
615
assert . strictEqual ( 8 , metadata . orientation ) ;
616
+ assert . strictEqual ( 320 , metadata . width ) ;
617
+ assert . strictEqual ( 240 , metadata . height ) ;
618
+ assert . strictEqual ( 240 , metadata . appliedOrientation . width ) ;
619
+ assert . strictEqual ( 320 , metadata . appliedOrientation . height ) ;
604
620
assert . strictEqual ( 'object' , typeof metadata . exif ) ;
605
621
assert . strictEqual ( true , metadata . exif instanceof Buffer ) ;
606
622
// EXIF
@@ -926,7 +942,11 @@ describe('Image metadata', function () {
926
942
pagePrimary : 0 ,
927
943
compression : 'av1' ,
928
944
hasProfile : false ,
929
- hasAlpha : false
945
+ hasAlpha : false ,
946
+ appliedOrientation : {
947
+ width : 2048 ,
948
+ height : 858
949
+ }
930
950
} ) ;
931
951
} ) ;
932
952
0 commit comments