Pixel probes for rendering tests.
Images are packed RGB bytes, row-major from the top-left corner, the layout of fortplot's raster buffer and of a binary PPM (P6) body. PDF output is rasterised by poppler's pdftoppm, an implementation that shares no code with fortplot, so PDF probes are independent oracles.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name |
Bounding box (0-based columns x0..x1, rows y0..y1) and pixel count of pixels within tol of rgb in every channel. count = 0 when none. region = [col_lo, col_hi, row_lo, row_hi] limits the search.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=1), | intent(in) | :: | img(:) | |||
| integer, | intent(in) | :: | w | |||
| integer, | intent(in) | :: | h | |||
| integer, | intent(in) | :: | rgb(3) | |||
| integer, | intent(in) | :: | tol | |||
| integer, | intent(out) | :: | x0 | |||
| integer, | intent(out) | :: | x1 | |||
| integer, | intent(out) | :: | y0 | |||
| integer, | intent(out) | :: | y1 | |||
| integer, | intent(out) | :: | count | |||
| integer, | intent(in), | optional | :: | region(4) |
Read a binary PPM (P6, maxval 255) as written by pdftoppm.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | path | |||
| integer(kind=1), | intent(out), | allocatable | :: | img(:) | ||
| integer, | intent(out) | :: | w | |||
| integer, | intent(out) | :: | h | |||
| logical, | intent(out) | :: | ok |
Rasterise page 1 of pdf with pdftoppm at dpi (no anti-aliasing).
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | ||||
| integer, | intent(in) | :: | dpi | |||
| integer(kind=1), | intent(out), | allocatable | :: | img(:) | ||
| integer, | intent(out) | :: | w | |||
| integer, | intent(out) | :: | h | |||
| logical, | intent(out) | :: | ok |