The only affected resolution I know is 1366x768. But I know many laptop has such resolution in our days and this case is an issue for their owners.
How to reproduce:
change resolution to 1366x768, even in windowed mode, take a screenshot in TGA or even in JPEG, checking the picture shows something like a corrupted screenshot.
I was aware of that problem since a long time but I didn't find the solution as I'm not and OpenGL expert. Btw today Google gave me good results and I found a fix.
The fix may also help for some other case. For example I saw better result on a screenshot from a windowed game with part of the window hidden out of the screen.
You're right. This problem was introduced through my switching screenshot glReadPixels from RGBA to RGB.
However, setting the PACK size to 1 will probably hurt performance, probably by as much as a factor of 4. I'll rewrite this to properly take into account paddings at the end of lines. This is probably the best solution. This will also allow for higher PACK sizes which is probably alot more efficient if the bus to the graphics card allows for it, but that's something that is up for testing. :)
Created attachment 2662 [details] Fix #4954 with perfect screenshots I tested with this patch and it works perfectly now. Setting GL_PACK_ALIGNMENT to 1 is the recommended value I found for screenshot. I choose to store the current GL_PACK_ALIGNMENT value to set it again after the glReadPixels call even if it seems the value is always 4 because who knows what value will be set by default in the future. Téquila from Smokin'Guns Team