Skip to content

BIF parity: support convert --to bif --factor/--target-mag (reduce-during-convert) #11

Description

@cornish

convert --to bif does not accept --factor/--target-mag, but every other --to target (svs/tiff/ome-tiff/cog-wsi/dicom) does (they route through runConvertFactor to emit a reduced pyramid). Currently --to bif --factor N errors with "not yet supported".

Goal: support convert --to bif --factor {2,4,8,16} / --target-mag, emitting the reduced pyramid as a BIF (row-major level=N IFDs, regenerated EncodeInfo for the new grids, regenerated overview).

Approach: reuse the shared reduce engine (internal/downscale / the runConvertFactor path) to produce reduced levels, then feed them to bifwriter.WritePyramid. The re-encode worker pool already exists for the tile production.

Part of the BIF writer parity set (bringing convert --to bif to parity with the other write targets). Context: internal/tiff/bifwriter + cmd/wsitools/convert_bif.go; cleanup backlog in docs/superpowers/specs/2026-06-17-bif-writer-feasibility.md §10. Note: opentile-go mis-renders BIF output until opentile-go#57 lands, so verify with bio-formats/QuPath, not opentile.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions