Getting error 'Image height exceeds user limit in IHDR'
nonvwvnon opened this issue · 9 comments
I am on the 64 bit linux server.
i couldn't find image.cpp as mention in another ticket - #59
how do we increase the limit?
care to give more details how to fix it.
thanks alot.
Error message:
libpng warning: Image width exceeds user limit in IHDR
libpng warning: Image height exceeds user limit in IHDR
libpng warning: Invalid image width in IHDR
libpng warning: Invalid image height in IHDR
libpng warning: Width is too large for libpng to process pixels
libpng error: Invalid IHDR data
care to give advice on what i could be missing?
image limits: 0x15 to 18446744073709551615x18446744073709551614 will be the cropped image (18446744073709551615x18446744073709551599)
Writing json information: /home/myshelter/morpork/morpork.json
--- SAVING IMAGE ---
path: /home/myshelter/morpork/mcmap/./makemap/map.png
libpng warning: Image width exceeds user limit in IHDR
libpng warning: Image height exceeds user limit in IHDR
libpng warning: Invalid image width in IHDR
libpng warning: Invalid image height in IHDR
libpng warning: Width is too large for libpng to process pixels
libpng error: Invalid IHDR data
/home/myshelter/morpork/mcmap/./makemap/map.png: unknown libpng error
Actually the problem here is c10t trying to create a 18446744073709551615x18446744073709551614 image.
EDIT 1: This problem is caused by oblique mode (-q).
Thanks alot, protected!
Finally someone replied :D
what is your suggestion for a good map generate mode?
We have to wait for someone to fix it. Use top down (no mode flags) for now, if you want the same shape of map.
is c1lot developer around to fix it?
um this is still an issue?
It has been some time since I last looked into this project, however this issue looks to me like misuse of libpng and c10t seems to have ignored the png size limitations set by the png standard itself (according to the specification it should be "2^31").
A quick look at generate_map.cpp#L682, png.hpp#L21 and image_base.hpp#L23 suggest that similar issues may still be possible to trigger.
However the way other size issues were resolved was to default the maximum radius -R parameter to 1000, ensuring that a resulting image has a guaranteed size limit, of course to render other areas outside of this radius you would have to specify --center, or even using -L to slice the resulting world image into multiple images. Additionally I have personally not seen any libpng issues on any of my own worlds as far as I can remember and those are not that small either but you know, not as large as a public server could be expected to be but whatever...
I would suggest that if you manage to trigger a libpng issue you open a new ticket, perhaps referencing this post and #59 depending on the cause.
i am having the same issue:
libpng warning: Invalid image width in IHDR
libpng warning: Image width exceeds user limit in IHDR
libpng warning: Invalid image height in IHDR
libpng warning: Image height exceeds user limit in IHDR
libpng error: Invalid IHDR data
libpng warning: Invalid image width in IHDR
libpng warning: Image width exceeds user limit in IHDR
libpng warning: Invalid image height in IHDR
libpng warning: Image height exceeds user limit in IHDR
libpng error: Invalid IHDR data
@B-Yassine Sorry for the late answer, please open a new issue instead as I suggest in my previous post and include your command line and the version of c10t or more likely the git commit you used to compile c10t since I don't think there is a binary release that is up to date available.