hint
As stated in other answers, the radiation from the list of contour pixels can be implemented as a sweepline process, during which the neighborhood of 3x3 launch endpoints is investigated.
This procedure will emit pixels in a scrambled manner, as a sequence of forward and reverse arcs that need to be saved and reordered.
An alternative may be based on the idea of introducing a standard Moore neighborhood algorithm, which has the advantage of listing edge pixels in the desired order.
This procedure requires knowing the 8-circle configuration around the current pixel, and the idea is to update this neighborhood every time we switch to another pixel: we support indexes for the run that contains the current pixel, and for the two runs that access it in the lines above and below.
Each time we switch to another pixel, we need to update these three indexes, which will include short sequential searches in the list of sorted runs. This can be considered as a pseudo-random access mechanism for pixels, taking into account that sequential calls are very local and can be cached.
Update
In the encoded representation with the string length that I use, only black runs are encoded, in the form of a triple (X, Y, L) . Runs are sorted in rows from top to bottom, and then from left to right in a row.
For convenience, we can proceed to the “linear addressing” scheme, as if all lines of images were added to each other, and each pixel is denoted by one number Z = X + Y.Nx (where Nx is the image width).
So, we have a list of black runs, and white spaces are implicitly found between two consecutive black ones.
During processing, we always remember the start index, which begins immediately before or at the current pixel ( R[I].Z <= Z < R[I+1].Z ). We can specify the color of the pixel by checking if we are inside the path or between it and the next one ( Z < R[I].Z + R[I].L ).
If we move one position to the left, Z decreases by 1 , and we may need to select the previous run ( I-- ).
If we move one position up, Z decreases by Nx , and we may need to retreat a few runs ( I-- to R[I].Z <= Z again).

The figure shows the current pixel and its 4 neighbors, as well as the “influence zones” of the black runs. We can also handle all eight offset directions.
As we see, each step takes several operations, the worst, equal to the number of runs in a row, which is considered small. Using this concept, we can cross the RLC view in any way at a reasonable price without restoring the entire bitmap.
Since the Moore neighborhood algorithm takes time linear in the length of the contour, an implementation based on this addressing with a linear run will also take linear time (for a limited number of runs per line).