Skip to content
Snippets Groups Projects
Commit 980a3aa8 authored by Marco De Donno's avatar Marco De Donno
Browse files

Rotate the image of the segment

parent 739569fd
No related branches found
No related tags found
No related merge requests found
......@@ -323,6 +323,10 @@ def do_image_tenprint_segmentation( tenprint_id ):
tl_x, tl_y, br_x, br_y = [ z[ "x" ], z[ "y" ], z[ "x" ] + z[ "width" ], z[ "y" ] + z[ "height" ] ]
tmp = img.crop( ( tl_x, tl_y, br_x, br_y ) )
if z[ "orientation" ] != 0:
tmp = tmp.rotate( -z[ "orientation" ], Image.BICUBIC, True )
buff = StringIO()
tmp.save( buff, format = img_format )
buff.seek( 0 )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment