refactoring

This commit is contained in:
Colombo 2019-12-22 14:05:41 +04:00
commit 8153e90ba3
13 changed files with 80 additions and 186 deletions

15
DFLIMG/DFLIMG.py Normal file
View file

@ -0,0 +1,15 @@
from pathlib import Path
from .DFLJPG import DFLJPG
from .DFLPNG import DFLPNG
class DFLIMG():
@staticmethod
def load(filepath, loader_func=None):
if filepath.suffix == '.png':
return DFLPNG.load( str(filepath), loader_func=loader_func )
elif filepath.suffix == '.jpg':
return DFLJPG.load ( str(filepath), loader_func=loader_func )
else:
return None