honeybee_vtk.image_processing module

Functionality for image processing.

honeybee_vtk.image_processing.write_gif(time_step_images_path: str, target_path: str = '.', gradient_transparency: bool = False, duration: int = 1000, loop_count: int = 0, linger_last_frame: int = 3, text_height: int = 20) → str[source]

Export a GIF from a time step images.

This function will generate one folder for each grid found in the model.

Parameters
  • time_step_images_path – The path to the folder containing the images. for time steps.

  • target_path – The path to the folder to write the GIF to. Defaults to current working directory.

  • gradient_transparency – Whether to use a gradient transparency. or not. If chosen a gradient of transparency will be used. Which will make the image in the back more transparent compared to the image in the front. Defaults to False which will use a flat transparency. which means the all images will have same amount of transparency.

  • duration – The duration of the gif in milliseconds. Defaults to 1000.

  • loop_count – The number of times to loop the gif. Defaults to 0 which will loop infinitely.

  • linger_last_frame – An integer that will make the last frame linger for longer than the duration. If set to 0, the last frame will not linger. Setting it to 3 will make the last frame linger for 3 times the duration. Defaults to 3.

  • text_height – An integer to set the text height in pixels. Default is set to 20.

Returns

The path to the folder where GIFs are exported.

honeybee_vtk.image_processing.write_transparent_images(time_step_images_path: str, target_path: str = '.', transparency: float = 0.5) → str[source]

Write a transparent image for each of the time step images.

This function will generate one folder for each grid found in the model.

Parameters
  • time_step_images_path – The path to the folder containing the images. for time steps.

  • target_path – The path to the folder where the transparent images will be written to. Defaults to current working directory.

  • transparency

    The transparency value to use. Acceptable values are decimal point numbers between 0 and 1 inclusive. 0 is completely transparent and 1

    is completely opaque. Defaults to 0.5.

Returns

The path to the folder where the transparent images are written to.