5 Aug
2013
5 Aug
'13
9:21 p.m.
On 5-8-2013 23:13, Krzysztof KosiĆski wrote:
2013/8/5 Johan Engelen <jbc.engelen@...2592...>:
Hi all, Hope that someone who knows a bit about /src/display/sodipodi-ctrl can help me with these lines:
for (y = 0; y < side; y++){ px = reinterpret_cast<guint32*>(data + y * r); for (x = 0; x < side; x++) { *p++ = *px++; } }
The "px++" is not necessary right? Should just be "px" the way I see it.
No, the increment is necesary, because this line is copying an image row by row. Otherwise it would fill p with copies of the first pixel in the row.
The only thing to do here is to perhaps move the declaration of px inside the loop.
Ah, lol, getting late :-) Missed the for loop completely, doh! Thanks for paying attention better than me.
Cheers, Johan