pierogis.ingredients.seasonings.seasoning module

seasoning base ingredient

class pierogis.ingredients.seasonings.seasoning.Seasoning(opacity: int = 100, mask: Optional[numpy.ndarray] = None, **kwargs)[source]

Bases: pierogis.ingredients.ingredient.Ingredient

Seasonings can perform their computation before the cook stage.

Seasonings are masks that use their season function to generate a selection of pixels to be operated on by a cook operation.

They can be put into a mix to define a mask for a default target.pixels.shape sized “all passing” array. The can also be added to an ingredient through the season method.

Return from cook should be binary (black_pixel, or white_pixel)

cook(pixels: numpy.ndarray)[source]

Pixels that match the include pixel should be set as the include pixel, otherwise set as the exclude pixel

This isn’t very useful, this is mostly an abstract class.

prep(include: Optional[str] = None, exclude: Optional[str] = None, **kwargs)[source]
Parameters
  • pierogi – If set, target will be the pixels that are cooked

  • include – color to use for included pixels

like little flakes of seasoning.

can be hex

Parameters

exclude – color to use for excluded pixels