Closed mili-inch closed 4 years ago
This is almost certainly caused by using linesize / 4
instead of width
when writing the data
https://github.com/synap5e/obs-screenshot-plugin/blob/9bd40519a4e17763b739ab8e34483cc0fb8f6af8/screenshot-filter.c#L106-L109
So this was more complicated than just using width
.
The original image was using a 32-aligned linesize (based on cpu word sizes), it was necessary to encode using a 4-aligned linesize and truncate each line when copying into the buffer.
This explains why I used linesize / 4
not width, since I was somewhat confused about that...
If you would like to try 1.3.0rc1 this should solve the issue.
The output images will have a transparent area to its right side if the filter is added to a source with an unusual size like 500x500. Tested environment: obs-studio 24.0.3 64bit file mode media source (webm) 500x500 output size: 512x500