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

Screenshots not working for enormous resolutions. #28

Open
Minecraftian14 opened this issue May 15, 2020 · 3 comments
Open

Screenshots not working for enormous resolutions. #28

Minecraftian14 opened this issue May 15, 2020 · 3 comments

Comments

@Minecraftian14
Copy link

Minecraftian14 commented May 15, 2020

Nice mod, but few problems:
-> Screenshots as big as 20000x20000 are just huge black squares.
-> Screenshots as big as the 65500x65500 are not even accepted. When I press F9, a message pops up
"Couldn't save screenshot: Negative capacity: -14151888"

I use Photo Paint to view the images, have 8gb ram, and a full TB left in my hard drive.
Thank you.

@MggMuggins
Copy link
Contributor

Sounds like an integer overflow someplace. Probably could be fixed by increasing the size of the types that are used to store resolutions/indices. I'm not familiar with the internals though.

@NoahBPeterson
Copy link

NoahBPeterson commented May 20, 2020

bb = ByteBuffer.allocateDirect(dim.getWidth() * dim.getHeight() * BPP);

65500 * 65500 * 3 overflows to -14151888

As far as I can tell, the ByteBuffer class cannot have a buffer greater than the maximum allowable Java array size, which is 2^32 - 8. The maximum image size must be less than this, ex. 37837 * 37837 * 3. The LWJGL function glReadPixels() only accepts objects of the type Buffer, so there's not much that can be done.

Did you enable Tiled Rendering? This seems to be the only way to get around this limitation.

@Minecraftian14
Copy link
Author

Umm.... When I enable tile rendering, it takes normal screenshots and arrange them one after the other to fill the space (the dimensions I provide). Is that what its supposed to do? And then what's it actual use?

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

3 participants