I am working with SDL v1.2.9 and I’ve written a simple program to help me view detail in large images.
It takes in a jpeg, then makes several copies of it, each shrunk by a larger scale factor, such that the smallest fits the application window.
The user then moves the mouse over the smallest image, and an area around the mouse displays one of the larger images i.e. a zoomed in view.
The problem is this:
For a certain input image mysterious vertical lines of incorrect colour appear on one of the shrunken images.
The problem is consistent in that the lines always appear for this image and the same zoom level.
However it is inconsistent in that
- If the input image is changed by in width, the problem does not occur.
- If the scale factor is changed even slightly the problem does not occur.
- If I simply run the image shrinking code (for the same input image and scale factor) outside of this program, then the problem does not occur.
The lines occur at 1/6, 1/3 and 2/3 of the image width.
I’ll not bother to post the code, since I have no idea where the problem is located.
I am hoping that this problem is familiar to someone or the location is clear from its character.