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

API for image dimensions and color #200

Open
StealWonders opened this issue Jun 12, 2024 · 3 comments
Open

API for image dimensions and color #200

StealWonders opened this issue Jun 12, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@StealWonders
Copy link
Contributor

UI team apparently needs this.
@maanex could you elaborate on the color properties you need and in which format?

@StealWonders StealWonders added the enhancement New feature or request label Jun 12, 2024
@StealWonders
Copy link
Contributor Author

StealWonders commented Jun 12, 2024

cc: @GamerBene19 for image-service integration

@maanex
Copy link

maanex commented Jun 13, 2024

The image entity should get three new fields

width: number!
height: number!
preview: number[]

width and height should be self-explanatory, just the image dimensions in px so we can do page layout before the image has loaded.

preview (not settled on the name, open for suggestions) should be an array of colors as rgb integers (e.g. 0x123456) that represents the image but scaled down to a tiny size. We need to decide on a size here but let's say we go with 4x4, that means preview has 4x4=16 numbers which you can think of as a 4x4 image we can render in the client and upscale+blur to create a placeholder for when the image hasn't loaded yet.

This preview value is not urgent at all and can be it's own issue, width and height would be pretty important though.

@maanex
Copy link

maanex commented Jun 13, 2024

Width and height should be the original image dimensions, aka the largest size the image is available in. In case that wasn't clear.

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

No branches or pull requests

2 participants