Skip to content

Commit

Permalink
Fix tga decoding issue (#82)
Browse files Browse the repository at this point in the history
Fix tga decoding issue
  • Loading branch information
Speykious authored Feb 14, 2024
2 parents ea6425f + c198d0e commit 32de80c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inox2d/src/texture/tga.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ pub fn read_tga<R: Read + Seek>(reader: &mut R) -> Result<TgaImage, TgaDecodeErr
let channels: TgaChannels = (header.bits_pp / 8).try_into().unwrap(); // bytes per pixel
let tchans = 4;
let linebuf_size = header.width * channels as u16;
let tline_size = header.height * tchans;
let tline_size = header.width * tchans;

let flip = !is_origin_at_top;
let tstride = if flip { -(tline_size as i32) } else { tline_size as i32 };
Expand Down

0 comments on commit 32de80c

Please sign in to comment.