Skip to content

Extract RGB pixels #134

Description

@stiang

This might be trivial for people who understand image formats better than me, but is there currently a way to use this library to extract the RGB pixels from an image, so that they are suitable for use with BlurHash?

Here is the example code from the blurhash-elixir package:

# Pixel data supplied in RGB order, with 3 bytes per pixels.
pixels = [255, 43, 20, 11, 0, 155, ...]

hash = BlurHash.encode(pixels, 30, 30, 4, 3)

I’m looking for a way to get the pixels in the above code from an image opened with Image.open/2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions