Maxime Bellengé maxime.bellenge@laposte.net writes:
- bits = HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,
samprow=HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,jd.output_width*jd.output_components);(jd.output_height+1)*(jd.output_width+jd.output_width%sizeof(DWORD))*jd.output_components);
- oldbits = bits;
- oldsamprow = samprow;
- padding = jd.output_width%sizeof(DWORD);
The computations of the total width and of the padding are wrong, "width % sizeof(DWORD)" doesn't yield the result you want.