brepjs API Reference
    Preparing search index...

    Function surfaceFromImage

    • Create a surface from an image blob by interpreting pixel brightness as height. Requires createImageBitmap and OffscreenCanvas (available in browsers and some worker environments; not available in Node.js).

      Parameters

      • blob: Blob

        Image data as a Blob

      • options: SurfaceFromImageOptions = {}

        Channel selection, downsampling, and grid options

      Returns Promise<Result<AnyShape>>

      A Result containing the surface shape