Alex Beregszaszi wrote: > Hi, > >> ... >> switch(depth){ >> case 24: >> for(i = 0; i < avctx->height; i++){ >> memcpy(ptr, buf, n); >> buf += n; >> ptr += linesize; >> } >> break; >> ... >> >> Should it not be memcpy(ptr, buf, linesize) ? > > n probably means input linesize, while linesize is the output linesize. Yes. > I guess 24bit BMP doesnt stores the padding 1 byte. Actually it does, see /* Line size in file multiple of 4 */ n = (avctx->width * (depth / 8) + 3) & ~3; and that's why I am suspicious. > -- Michel Bardiaux R&D Director T +32 [0] 2 790 29 41 F +32 [0] 2 790 29 02 E mailto:mbardiaux at mediaxim.be Mediaxim NV/SA Vorstlaan 191 Boulevard du Souverain Brussel 1160 Bruxelles http://www.mediaxim.com/
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4