blurHashForPixels method

Pointer<Char> blurHashForPixels(
  1. int xComponents,
  2. int yComponents,
  3. int width,
  4. int height,
  5. Pointer<Uint8> rgb,
  6. int bytesPerRow,
)

encode : Returns the blurhash string for the given image This function returns a string containing the BlurHash. This memory is managed by the function, and you should not free it. It will be overwritten on the next call into the function, so be careful! Parameters : xComponents - The number of components in the X direction. Must be between 1 and 9. 3 to 5 is usually a good range for this. yComponents - The number of components in the Y direction. Must be between 1 and 9. 3 to 5 is usually a good range for this. width - The width in pixels of the supplied image. height - The height in pixels of the supplied image. rgb - A pointer to the pixel data. This is supplied in RGBA format, with 4 bytes per pixels. bytesPerRow - The number of bytes per row of the RGB pixel data.

Implementation

ffi.Pointer<ffi.Char> blurHashForPixels(
  int xComponents,
  int yComponents,
  int width,
  int height,
  ffi.Pointer<ffi.Uint8> rgb,
  int bytesPerRow,
) {
  return _blurHashForPixels(
    xComponents,
    yComponents,
    width,
    height,
    rgb,
    bytesPerRow,
  );
}