@@ -228,6 +228,38 @@ def testVisibleSize():
228228 assert_equal (h , s .height )
229229 assert_equal (w , s .width )
230230
231+ def testCropSizeNikon ():
232+ with rawpy .imread (rawTestPath ) as raw :
233+ s = raw .sizes
234+ assert_equal (s .crop_left_margin , 0 )
235+ assert_equal (s .crop_top_margin , 0 )
236+ assert_equal (s .crop_width , 0 )
237+ assert_equal (s .crop_height , 0 )
238+
239+ def testCropSizeCanon ():
240+ with rawpy .imread (raw3TestPath ) as raw :
241+ s = raw .sizes
242+ assert_equal (s .crop_left_margin , 168 )
243+ assert_equal (s .crop_top_margin , 56 )
244+ assert_equal (s .crop_width , 5616 )
245+ assert_equal (s .crop_height , 3744 )
246+
247+ def testCropSizeSigma ():
248+ with rawpy .imread (raw4TestPath ) as raw :
249+ s = raw .sizes
250+ assert_equal (s .crop_left_margin , 0 )
251+ assert_equal (s .crop_top_margin , 0 )
252+ assert_equal (s .crop_width , 0 )
253+ assert_equal (s .crop_height , 0 )
254+
255+ def testCropSizeKodak ():
256+ with rawpy .imread (raw6TestPath ) as raw :
257+ s = raw .sizes
258+ assert_equal (s .crop_left_margin , 0 )
259+ assert_equal (s .crop_top_margin , 0 )
260+ assert_equal (s .crop_width , 0 )
261+ assert_equal (s .crop_height , 0 )
262+
231263def testHalfSizeParameter ():
232264 raw = rawpy .imread (rawTestPath )
233265 s = raw .sizes
0 commit comments