ImageProcessor

Up and coming: shot check knows this class and its members today, and programs run it once the native runtime lands.

Up and coming

Stack blur, shadows, outlines, colour curves and your own shaders, tune them in Properties, and run the look over one picture or a whole folder.

Each effect is a child instance with properties, like Roblox's post-processing effects. ProcessAsync runs the children on the GPU over a texture, a file or bytes, in LayoutOrder, then name, skipping any with Enabled off. Between effects the picture passes through a pool of same-size textures that is emptied when the call returns. Make one in the project tree or with Instance.new("ImageProcessor").

Made with Instance.new("ImageProcessor") or Clone().

Methods

NameArgumentsReturnsDescription
ProcessAsync
yields
(input: GpuTexture | string | buffer, output: (GpuTexture | string)?, maps: RenderMaps?)(GpuTexture?, string?)Runs the enabled child effects over the input and waits; a path output saves a PNG, and maps feed effects that need depth or normals.
ProcessFolderAsync
yields
(input: string | PathHandler, output: string | PathHandler, pattern: string?)(number?, string?)Runs the chain over every image in a folder and returns how many it did.

Events

NamePassesDescription
EffectRan(ImageEffect, number)Fires after each effect runs, passing the effect and the seconds it took.
From ShotInstance 33