gosdk
gosdk copied to clipboard
Thumbnail wazero integrate
Changes
-
API to generate thumbnail of given image. Accepts three parameters.
Thumbnail(img []byte, width, height int)
img
-> byte array of image,width
andheight
-> width and height of expected thumbnail image inpixels
, -
If it results in error, the second parameter (error) will be error message of string type.
-
Otherwise, the second parameter will always be null. The first parameter contains byte array of thumbnail image.
NOTE: The first parameter will be empty array if it's unsuccessful (e.g couldn't generate due to unsupported format). This can be used as a fallback mechanism to generate thumbnail in the frontend.
Fixes
Tests
Tasks to complete before merging PR:
- [ ] Ensure system tests are passing. If not Run them manually to check for any regressions :clipboard:
- [ ] Do any new system tests need added to test this change? do any existing system tests need updated? If so create a PR at 0chain/system_test
- [ ] Merge your system tests PR to master AFTER merging this PR
Associated PRs (Link as appropriate):
- blobber:
- 0chain:
- system_test:
- zboxcli:
- zwalletcli:
- Other: ...