Skip to content

BIF parity: format-preserving downsample/crop for BIF (BIF→BIF) #12

Description

@cornish

downsample/crop are format-preserving for svs/tiff/ome-tiff/cog-wsi/dicom (a DICOM source downsamples to a DICOM pyramid, etc.). BIF is not yet a format-preserving target: downsample <bif> / crop <bif> do not produce a BIF.

Goal: downsample <slide.bif> and crop <slide.bif> emit a BIF (BIF→BIF), matching the other formats. Lossless crop (verbatim L0 frame-copy) where the tile grid is preserved; re-encode otherwise.

Approach: wire the BIF writer (bifwriter.WritePyramid) into the downsample/crop format-preserving dispatch; regenerate EncodeInfo/overview for the new geometry. Depends on the --to bif writer (shipped) and likely the --factor work (#parity-1).

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

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions