Merge pull request #1358 from opencv/nm/fix_preview_size

Increase preview size
main
Dmitry Kalinin 6 years ago committed by GitHub
commit c17303bbed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added option to display shape text always
### Changed
-
- Increase preview size of a task till 256, 256 on the server
### Deprecated
-

@ -52,11 +52,12 @@ class IMediaReader(ABC):
@staticmethod
def _get_preview(obj):
PREVIEW_SIZE = (256, 256)
if isinstance(obj, io.IOBase):
preview = Image.open(obj)
else:
preview = obj
preview.thumbnail((128, 128))
preview.thumbnail(PREVIEW_SIZE)
return preview.convert('RGB')

Loading…
Cancel
Save