Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flip_vertically results in black image when there are vertical lines #147

Open
berkowitze opened this issue Jan 28, 2025 · 0 comments
Open

Comments

@berkowitze
Copy link

Cloning any of the reference codes for lesson 1 (for example here) and adding in a vertical line results in the output image being black, unless you remove the flip_vertically() call.

int main(int argc, char** argv) {
    TGAImage image(100, 100, TGAImage::RGB);

    line(60, 40, 60, 20, image, TGAColor(255, 100, 100, 255));
    // with this line, black image. without, things work fine
    image.flip_vertically(); // i want to have the origin at the left bottom corner of the image
    image.write_tga_file("output.tga");
    return 0;
}

Curious if other people can repro. I'm on a Mac, if that makes any difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@berkowitze and others