gosdk icon indicating copy to clipboard operation
gosdk copied to clipboard

Thumbnail wazero integrate

Open storybehind opened this issue 10 months ago • 0 comments

Changes

  • API to generate thumbnail of given image. Accepts three parameters. Thumbnail(img []byte, width, height int) img -> byte array of image, width and height -> width and height of expected thumbnail image in pixels,

  • 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.

benchmark image.txt

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: ...

storybehind avatar Apr 25 '24 15:04 storybehind