kopia lustrzana https://github.com/sepandhaghighi/samila
commit
9a83d1fb0a
|
@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|||
### Changed
|
||||
- `depth` parameter added to `save_image` method
|
||||
- `depth` parameter added to `save_fig_file` function
|
||||
- `save_image` and `nft_storage` methods background bug fixed
|
||||
- `README.md` updated
|
||||
- Test system updated
|
||||
## [0.2] - 2021-10-14
|
||||
### Added
|
||||
|
|
Plik binarny nie jest wyświetlany.
Przed Szerokość: | Wysokość: | Rozmiar: 184 KiB Po Szerokość: | Wysokość: | Rozmiar: 197 KiB |
|
@ -129,7 +129,11 @@ def save_fig_file(figure, file_adr, depth):
|
|||
return {"status": False, "message": NO_FIG_ERROR_MESSAGE}
|
||||
result = {"status": True, "message": FIG_SAVE_SUCCESS_MESSAGE}
|
||||
try:
|
||||
figure.savefig(file_adr, dpi=depth * figure.dpi)
|
||||
figure.savefig(
|
||||
file_adr,
|
||||
dpi=depth * figure.dpi,
|
||||
facecolor=figure.get_facecolor(),
|
||||
edgecolor='none')
|
||||
return result
|
||||
except Exception as e:
|
||||
result["status"] = False
|
||||
|
@ -153,7 +157,11 @@ def save_fig_buf(figure):
|
|||
"buffer": None}
|
||||
try:
|
||||
buf = io.BytesIO()
|
||||
figure.savefig(buf, format='png')
|
||||
figure.savefig(
|
||||
buf,
|
||||
format='png',
|
||||
facecolor=figure.get_facecolor(),
|
||||
edgecolor='none')
|
||||
result["buffer"] = buf
|
||||
return result
|
||||
except Exception as e:
|
||||
|
|
Ładowanie…
Reference in New Issue