Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

Commit

Permalink
changed fsb rounding error output location
Browse files Browse the repository at this point in the history
  • Loading branch information
GlassesNerd committed Nov 18, 2021
1 parent 2ffe00b commit c312fc7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fsb.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,15 +158,15 @@ class fsb
filename.erase(filename.end() - 4, filename.end());
checkError(lodepng::load_file(buffer, png.path().u8string()));
checkError(lodepng::decode(image, w, h, state, buffer));
if (w % 3 != 0 || h % 2 != 0)
{
out(4) << "FSB: Wrong dimensions: " << png.path().u8string() << std::endl << "will be cropped to proper dimensions" << std::endl;
}
image1.reserve(buffer.size() / 6);
image2.reserve(buffer.size() / 6);
image3.reserve(buffer.size() / 6);
const unsigned int outw = w / 3 * 4;
const unsigned int outh = h / 2;
if (w % 3 != 0 || h % 2 != 0)
{
out(4) << "FSB: Wrong dimensions: " << png.path().u8string() << std::endl << "will be cropped to proper dimensions" << std::endl;
}
for (size_t i = 0; i < (w * 4) * outh; i++)
{
if (i % (w * 4) < outw)
Expand Down

0 comments on commit c312fc7

Please sign in to comment.