Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thumbnail wazero integrate #1474

Draft
wants to merge 13 commits into
base: sprint-1.14
Choose a base branch
from
Draft

Conversation

storybehind
Copy link
Collaborator

@storybehind storybehind commented Apr 25, 2024

Changes

  • API to generate thumbnail of given image. Accepts four parameters.
    Thumbnail(img []byte, width, height int, options string)
    img -> byte array of image,
    width and height -> width and height of expected thumbnail image in pixels,
    options -> To support future enhancements. Currently, it accepts input_format - format of input image (e.g jpeg, png). use input_format to avoid using unnecessary converters. Should be JSON encoded. Example:
{
  "input_format": "",
}
  • If it's unsuccessful, the second parameter (error) will be error message of string type. One reason for failure can be due to unsupported image types.

  • Otherwise, the second parameter will always be null. The first parameter contains result with JSON encoded. thumbnail_img -> byte array of thumbnail image
    format -> format of thumbnail. Format is always jpeg but may be converted to avif due to smaller bitrate. Better to support both.
    Example:

{
   "thumbnail_img": [],
   "format" : "",
}

Fixes

Tests

Tasks to complete before merging PR:

  • Ensure system tests are passing. If not Run them manually to check for any regressions 📋
  • 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: ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant