Plethora777 / mcpe_viz

Minecraft Pocket Edition (MCPE) World Visualization & Reporting Tool with Web App
GNU General Public License v2.0
167 stars 39 forks source link

libpng error #9

Open cbos0503 opened 7 years ago

cbos0503 commented 7 years ago

Getting this error when using:

Read 530919 records Status: OK Do Output: overworld Generate Image

This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. libpng warning: Image width exceeds user limit in IHDR libpng error: Invalid IHDR data

Plethora777 commented 7 years ago

Interesting. It should be auto-tiling if you have a huge world. Can you upload the world files somewhere so that I can grab them & have a look at what's going on?

cbos0503 commented 7 years ago

https://www.dropbox.com/s/21nxv4suzk4kmcx/Midgard.mcworld?dl=0

Plethora777 commented 7 years ago

Thanks very much for that! You have a huge world :) 12,564,736 x 22,944!

I've found the issue and I will fix it in the next update. That update is a bit delayed because I'm working on support for MCPE v0.17 / 1.0.0. The update seems to work well on 0.17 worlds, but I need a bit more time to update the spawn checking code for the new cubic chunks scheme.

Soon!

cbos0503 commented 7 years ago

Lol. Are those dimensions in blocks? Had some ambitious young admins TP themselves ridiculously far away.

Thanks for the prompt response!

Plethora777 commented 7 years ago

Just pushed an update for v1.0. I looked at a fix for this issue, and unfortunately it's going to need some more thought. The dims of your world are larger than the limit for PNG images. We use PNG internally for all imagery. A work-around is possible but my initial thoughts on workarounds are pretty ugly :) I'm going to have to think about it a bit. Sorry!

cbos0503 commented 7 years ago

Is there a way to run Viz and just have it render +-x, +-z blocks from the world spawn coordinates?

Plethora777 commented 7 years ago

Yep that would be one way to handle it. I will ponder it. I suspect that most people use the helper app to run it on windows, so I'd like to come up with something cleaner / easier for the users.

cbos0503 commented 7 years ago

Thanks. I really appreciate it. :)

nhoefer2 commented 5 years ago

Has there been any update on this or even a temporary workaround?

I have the same issue

nhoefer2 commented 5 years ago

I did some digging. This may or may not help:

png_set_user_limits(png, 0x7fffffffL, 0x7fffffffL);

https://linux.die.net/man/3/libpng

The PNG specification allows the width and height of an image to be as large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. Since very few applications really need to process such large images, we have imposed an arbitrary 1-million limit on rows and columns. Larger images will be rejected immediately with a png_error() call.