How to load image with IMG_Load() without the byte padding for each line?
If i load image such as 98x*** which is 3 bytes per pixel, it will create 2 bytes padding there to make it fit in 4 bytes sequences.
Is it possible to use IMG_Load() without generating the padded bytes in the ->pixels
raw data?
At the moment i use this to detect how many bytes it has been padded:
int pad = img->pitch - (img->开发者_JAVA百科w * img->format->BytesPerPixel);
And if > 0 Then i rebuild new image without the padded bytes... but this is inefficient, so im hoping if theres better fix?
精彩评论