Skip to content

FORMAT PNG #57834

@alexey-milovidov

Description

@alexey-milovidov

Use case

Generate pictures from point clouds.

Caveats

Data visualization is a trap. There are too many possible customizations.
We will add a minimal feature set without presenting it as a complete solution.
Frankly speaking, this feature is needed only because I often need it for my demos.

Describe the solution you'd like

The width and height should be controlled by the settings.
Optionally, we can have settings for color space and palette mapping.
It should expect one of the following result structure variants:

A row per pixel in the pixel order. It will expect width * height number of rows, indexing the image in (y, x) order.:

  • A single column of Bool type, determining binary image.
  • A single column of integer or floating point type with a value between 0 and 255, determines the grayscale.
  • Three columns, named r, g, b, similar to the previous.
  • Four columns, named r, g, b, a, similar to the previous.

Rows determining explicit pixel coordinates:

  • columns x, y and v or r, g, b, or r, g, b, a - it will set every pixel to the latest value for its coordinate, and all other pixels to a background color.

The format will create an image buffer in memory, fill it with the data, then convert it to PNG with fpng, and stream the bytes to the output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurewarmup taskThe task for new ClickHouse team members. Low risk, moderate complexity, no urgency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions