Skip to content

Improve the image color recovery algorithm #21

Description

@w-jerome

Currently the system to recover the colors of the image is not very accurate. The idea is to take the base image, create a virtual copy, crop it into a new 1x1 image and rely on sampling to get "the main color of the image".
This solution is not clean and is not very accurate either.

The new idea would be to resize the image to a size of ~150 pixels, parse each pixel and store their numerical values in an array SplFixedArray and sort on it to get the most common colors (array_count_values).

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions