diff --git a/include/ehs/io/Glyph.h b/include/ehs/io/Glyph.h index 50dec7d..6672fba 100644 --- a/include/ehs/io/Glyph.h +++ b/include/ehs/io/Glyph.h @@ -20,7 +20,7 @@ namespace ehs public: Glyph(); - Glyph(Serializer<>& ser); + Glyph(Serializer& ser); Glyph(const Char_32 code); diff --git a/src/EHS.cpp b/src/EHS.cpp index a12d78b..779cd9d 100644 --- a/src/EHS.cpp +++ b/src/EHS.cpp @@ -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(); 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}; diff --git a/src/io/Glyph.cpp b/src/io/Glyph.cpp index a5f1fae..2c0b5c2 100644 --- a/src/io/Glyph.cpp +++ b/src/io/Glyph.cpp @@ -7,7 +7,7 @@ namespace ehs { } - Glyph::Glyph(Serializer<>& ser) + Glyph::Glyph(Serializer& ser) : code(ser.Read()), pos(ser.ReadVec2()), scale(ser.ReadVec2()), uv(ser.ReadRect()), bearing(ser.ReadVec2()), advance(ser.ReadVec2()) {