mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 18:27:24 +01:00
Prevent integer overflowing on 8k x 8k textures.
This commit is contained in:
parent
42ef951b82
commit
127bbcb485
1 changed files with 2 additions and 2 deletions
|
|
@ -180,8 +180,8 @@ public sealed class Texture : IDisposable
|
|||
using var stream = OpenTexStream(dalamud.GameData);
|
||||
var scratch = TexFileParser.Parse(stream);
|
||||
BaseImage = scratch;
|
||||
var rgba = scratch.GetRGBA(out var f).ThrowIfError(f);
|
||||
RGBAPixels = rgba.Pixels[..(f.Meta.Width * f.Meta.Height * f.Meta.Format.BitsPerPixel() / 8)].ToArray();
|
||||
var rgba = scratch.GetRGBA(out var f).ThrowIfError(f);
|
||||
RGBAPixels = rgba.Pixels[..(f.Meta.Width * f.Meta.Height * (f.Meta.Format.BitsPerPixel() / 8))].ToArray();
|
||||
CreateTextureWrap(dalamud.UiBuilder, scratch.Meta.Width, scratch.Meta.Height);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue