udoprog / c10t

A minecraft cartography tool
Other
225 stars 50 forks source link

Getting error 'Image height exceeds user limit in IHDR' #267

Closed nonvwvnon closed 10 years ago

nonvwvnon commented 12 years ago

I am on the 64 bit linux server.

i couldn't find image.cpp as mention in another ticket - https://github.com/udoprog/c10t/issues/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

nonvwvnon commented 12 years ago

care to give advice on what i could be missing?

Protected commented 12 years ago

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).

nonvwvnon commented 12 years ago

Thanks alot, protected! Finally someone replied :D

what is your suggestion for a good map generate mode?

Protected commented 12 years ago

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.

nonvwvnon commented 12 years ago

is c1lot developer around to fix it?

arjunyg commented 8 years ago

um this is still an issue?

evildeeds commented 8 years ago

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.

B-Yassine commented 5 years ago

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

evildeeds commented 5 years ago

@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.