开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜