Fixed image decoding.
This commit is contained in:
parent
b4674bd94c
commit
27dfd430ad
@ -20,7 +20,7 @@ namespace ehs
|
||||
public:
|
||||
Glyph();
|
||||
|
||||
Glyph(Serializer<>& ser);
|
||||
Glyph(Serializer<UInt_64>& ser);
|
||||
|
||||
Glyph(const Char_32 code);
|
||||
|
||||
|
@ -330,7 +330,7 @@ namespace ehs
|
||||
else if (colorType == 6)
|
||||
channels = 4;
|
||||
|
||||
*out = Img(out->GetId(), bitDepth, channels, {width, height});
|
||||
*out = Img(out->GetId(), bitDepth / 8, channels, {width, height});
|
||||
|
||||
UInt_8 compression = ihdrData->Read<UInt_8>();
|
||||
if (compression)
|
||||
@ -555,7 +555,7 @@ namespace ehs
|
||||
|
||||
UInt_64 size = width * channels * height;
|
||||
|
||||
*out = Img(out->GetId(), bitDepth, channels, {width, height});
|
||||
*out = Img(out->GetId(), bitDepth / 8, channels, {width, height});
|
||||
|
||||
Byte prevPixel[4] = {0, 0, 0, 255};
|
||||
|
||||
|
@ -7,7 +7,7 @@ namespace ehs
|
||||
{
|
||||
}
|
||||
|
||||
Glyph::Glyph(Serializer<>& ser)
|
||||
Glyph::Glyph(Serializer<ehs::UInt_64>& ser)
|
||||
: code(ser.Read<Char_32>()), pos(ser.ReadVec2<UInt_64>()), scale(ser.ReadVec2<UInt_64>()),
|
||||
uv(ser.ReadRect<float>()), bearing(ser.ReadVec2<Int_64>()), advance(ser.ReadVec2<UInt_64>())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user