Skip to content

vips_rank() fails with large windows #4609

@jcupitt

Description

@jcupitt

The histogram path for the rank filter causes errors with windows of 10x10 and up.

Reproducer:

#!/usr/bin/env python3

import pyvips

pyvips \ 
    .Image.svgload_buffer(b"""
        <svg viewBox="0 0 2000 2000">
        <rect width="100%" height="100%" fill="black"/>
        <circle r="500" cx="1000" cy="1000" fill="white"/>
        </svg>
     """) \
    .rank(10, 10, 0) \
    .write_to_file("x.png")

Makes:

Image

Referring discussion:

#4606 (reply in thread)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions