Skip to content

we should have proper global colormap support for animated GIF from multiple images. #28

@ChrisBarker-NOAA

Description

@ChrisBarker-NOAA

Within PyGNOMe, we do a coloramp to set various colors for drawing elements at different depths.

This is working fine for PNG images, but not for animated GIF. ???

Example code:

        cr = py_gd.color_ramp.ColorRamp(color_scheme,
                                            min_val, max_val,
                                            base_colorscheme=len(existing_colors))
        self.fore_image.add_colors(cr.colorlist)
        self.back_image.add_colors(cr.colorlist)

then:

            if self.depth_colors is not None:
                print("getting colors")
                color = self._color_ramp.get_color_indices(points_in_water[:, 2])
                print(color)

            self.draw_points(points_in_water,
                             diameter=self.point_size,
                             color=color,
                             shape="round")

which then calls:

            img.draw_dots(points, diameter=diameter, color=color)

Hmm -- maybe the problem is that the Animation add_frame is not using the colorramp??

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