Skip to content

Commit

Permalink
fix(vtfpp): use sizeof instead of bpp
Browse files Browse the repository at this point in the history
  • Loading branch information
craftablescience committed Nov 8, 2024
1 parent 983a491 commit f7fac98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/vtfpp/ImageConversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ template<ImagePixel::PixelType P>

std::span pixels{reinterpret_cast<const P*>(imageData.data()), imageData.size() / sizeof(P)};

std::vector<std::byte> out(imageData.size() / (ImageFormatDetails::bpp(P::FORMAT) / 8) * sizeof(C));
std::vector<std::byte> out(imageData.size() / sizeof(P) * sizeof(C));
BufferStream stream{out, false};
for (const auto& pixel : pixels) {
stream << pixel.*channel;
Expand Down

0 comments on commit f7fac98

Please sign in to comment.