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

Image height exceeds user limit in IHDR #59

Open
Ataman opened this issue Oct 9, 2010 · 3 comments
Open

Image height exceeds user limit in IHDR #59

Ataman opened this issue Oct 9, 2010 · 3 comments

Comments

@Ataman
Copy link

Ataman commented Oct 9, 2010

Hiho,

OS: Still Debian Lenny
2.6.26-2-openvz-amd64 #1 SMP Thu Sep 16 16:09:07 UTC 2010 x86_64 GNU/Linux

c10t version:
SNAPSHOT (10:57, 9. Sept 2010)

Our map got bigger, perhaps too big?
After the whole render process, c10t tries to save the map as a png and throws the following error:

done!
Saving image...
libpng warning: Image height exceeds user limit in IHDR
libpng warning: Invalid image height in IHDR
libpng error: Invalid IHDR data
/home/minecraft/bin/c10t: Success

I have no clue about libpng but might that "user limit" be hardcoded in c10t?

Greetings
Ataman

@Ataman
Copy link
Author

Ataman commented Oct 10, 2010

I tried the same thing again without -r 270 (assuming I would get an error like image width exceeds user limit) but got a little bit different message:
libpng warning: Image width exceeds user limit in IHDR
libpng warning: Invalid image width in IHDR
libpng warning: Width is too large for libpng to process pixels
libpng error: Invalid IHDR data

I suspect PNG's aren't made to be that large, are they?

@Lirum
Copy link

Lirum commented Oct 10, 2010

Solution:
image.cpp
after: png_init_io(png_ptr, fp);

add: png_set_user_limits(png_ptr, 0x7fffffffL, 0x7fffffffL);

Thanks to .blyzzz from minecraft.de

@evildeeds
Copy link
Collaborator

evildeeds commented Feb 5, 2019

Was this issue closed without any patch to c10t? I cannot find a commit adding a line with png_set_user_limits. I'll reopen this and check. png_init_io is now located at

png_init_io(write_struct, fp);

Edit: I know this is an old issue however "-r" is the number of degrees the rendering is rotated, you should use "-R" to limit how much of the world is rendered but maybe this issue was before "-R" was supported and limited to 1000 chunks?

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

No branches or pull requests

3 participants