Skip to content

v2.5.0

Latest

Choose a tag to compare

@rendro rendro released this 07 Nov 02:50

Film grain and light leaks

Two new effects, both optional and backwards compatible.

vintagejs(photo, {
  grain: 0.35,                                  // 0–1
  lightLeak: { intensity: 0.5, edge: 'left' },  // edge: left | right | top | bottom
});
  • grain: film grain that shows most in the midtones. It scales with the image size, so a small preview and the full-size photo look the same, and it is identical on every run (no flicker between renders).
  • lightLeak: a warm glow bleeding in from one edge, like light getting into an old camera. Optional color (default warm orange).
  • New exported types: TLightLeak, TLightLeakEdge, TRGBColor.
  • Tests now render real pixels in Node via @napi-rs/canvas.