Skip to main content

Scaling

Does the cost per pixel stay the same as the image grows?

One photo-like image at each side length from 128 to 4096 pixels, one representative operation of each kind, libstb against Pillow and OpenCV. A flat line means the cost per pixel stays constant; a falling line means it grows with the image.

decode PNG (throughput, higher is better)

decode JPEG (throughput, higher is better)

encode PNG (throughput, higher is better)

encode JPEG (throughput, higher is better)

resize, half size, cubic (throughput, higher is better)