Skip to content

This script designed to find a signiture in the file, crop and resize it to a standard size. (It is used widely in Pargar [an Iranian Enterprise Automation] )

License

Notifications You must be signed in to change notification settings

pooyanzarif/Signiture-Cropper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Signiture-Cropper

This script designed to find a signiture in the file, crop and resize it to a standard size. It is used widely in Pargar an Iranian Enterprise Automation.

Persian

سامانه اتوماسیون اداری "پرگار" نیاز دارد که امضاء کارکنان را در قالب استانداردی ذخیره نماید.

  • ابعاد امضای 500 در 500 باشد.
  • پس زمینه شفاف باشد.
  • امضای به صورت کامل و در مرکز تصویر قرار بگیرد.
  • با فرمت PNG ذخیره گردد. قبلا این کار به صورت دستی انجام می پذیرفت . به کمک این اسکریپت تمام امضاها به صورت خام در دایرکتوری مبدا قرار داده شده و سپس با اجرای این اسکریپت همه آنها پردازش و در دایرکتوری مقصد قرار می گیرد. برای راهنمایی استفاده از اسکریپت از سوییچ -h استفاده کنید.
C:\ kasra.py -h
> usage: kasra.py [-h] [-s SOURCE] [-d DESTINATION] [-v]
> 
> Prepare signitures in Pargar standards. Written by "Pooyan Zarif"
> 
> options:
>  -h, --help            show this help message and exit
>  -s SOURCE, --source SOURCE
>                        Enter Source directory. Default is "source"
>  -d DESTINATION, --destination DESTINATION
>                        Enter destination directory. Default is "destination"
>  -v, --verbose         verbose

Example

Copy all images in a directory and rename it to D1 Create an empty directory and rename it to D2

kasra.py -s D1 -d D2

Requirements

  • python 3
  • numpy
  • PIL
  • argparse

About

This script designed to find a signiture in the file, crop and resize it to a standard size. (It is used widely in Pargar [an Iranian Enterprise Automation] )

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages