Output PNG file doesn't read well in other programs

Output PNG file doesn't read well in other programs

Return to topic list

Sun Apr 9 21:56:06 2023   by   Coconutsales
I understand the reason for this - essentially for a 2000x1000 equirectangular image output, the file size is 5.72 MB - this is because there is extra data being encoded into the image file regarding the generated seed, and other values.

HOWEVER - when opening the output PNG file in an image editor then saving it, it negates all of that extraneous data.

So here in lies my problem: When generating a heightmap of a seed using, for example;

planet -s 0.2167486 -w 2000 -h 1000 -o HeightMap.png -C greyscale.col -pq

The output is the same 5.72 MB with all that extra data junk thrown in, making it not a "real" PNG file. This is shown when trying to export that heightmap into a program like Wonderdraft, which takes that image and does absolutely NOTHING with it - perhaps due to the extra data.

I have to nullify all that data manually to get a workable heightmap file

-----

My request is that one could specify a heightmap to be automatically generated to an different output file alongside normal generation. There be a command option like: -oH HeightMap.png - and it would ignore other inputs from generation that wouldn't affect a heightmap - and most importantly it would sterilize the output to include just image data pertaining to the file type requested in the output.

It'd look like this in usage:

planet -s 0.2167486 -w 2000 -h 1000 -o WorldMap.png -oH HeightMap.png -C Lefebvre2.col -b -pq -i -0.04

And of course, the Heightmap output would ignore command options like -C, -b, and -i as these wouldn't be required in a heightmap.

If that's too much, then perhaps there could be a command option to only generate the image output, and cleanse the output of any extra seed data, etc - like maybe -oC (output Cleanse) to replace the standard -o Filename.Filetype command option.


Thanks so much Torben for this great resource. Your tool is invaluable to me as I use it for all sorts of worldbuilding and map making! I also find it's been useful for making custom modded planet textures for a game called Starsector. The terrain generation is unlike anything else I've found in a map generator and the versatility and customization is such a gift.
 
Tue Apr 11 09:40:32 2023   by   Torben
I assume you mean BMP, as the program does not output PNG (I have considered adding this as an option, though).  It is true that a line is added to the end with information about the generation.  I did this because I got countless requests for recovering a seed from a map. Some image formats have an option for adding text data at the start of the image file, but not BMP.  So, I added the info at the end, which most viewers ignore.  If you use a viewer that reports an error instead, you could try to convert the image to another format first (in Linux, you can do that with the command "convert image.bmp image.png", where "image" is the file name without extension. On Windows, you can use, e.g., Gimp to load the file and save it in another format.
 

Return to topic list



New message:
Topic:
Posted by:

Type the values of the dice shown below:

Return to topic list