Page 1 of 1

Magic Map icons PNG/BMP - Strange issue

Posted: Tue Apr 24, 2018 9:46 pm
by Saumun
After making some custom icons for the magic map, they were not appearing on the map in-game. This made me remember the same problem when building The Trail (I think I mentioned it to Chaos-Shaman at the time, but I think it was via PM so it won’t be in the forum).

It’s a strange one, because some appear fine and some don’t. Anyway, for no real reason other than curiosity I remade them as 24bit BMPs (I usually use PNG) and every one of them appeared on the map. Some others that previously didn’t show, I redid as BMPs and they all worked too. So it seems that PNGs sometimes work and sometimes don’t on the magic map.

Anyone know the reason for this?

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Wed Apr 25, 2018 12:11 pm
by terkio
I presume the reason is in the header of the PNG.
It would be interesting to compare the headers of a png that has this issue with one that does not.
Or to replace the header of a bad png by the one of a good png.
This is what I would do with an hexadecimal editor on those files.

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Wed Apr 25, 2018 3:38 pm
by Chaos-Shaman
What is best to use, 24bit or 32bit? Using png on objects that show up in the end game crash the program :( have to use bmp but it is a much larger size for those objects.

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Wed Apr 25, 2018 4:27 pm
by Saumun
I don’t know what is best. I’ve always used PNG for everything, and they’ve worked fine until finding that some don’t show on the magic map.
I only tried the 24bit BMP on a whim, and found that they work on the map where some PNGs don’t. They are bigger files, but it’s negligible for magic map icons because they’re so small.

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Wed Apr 25, 2018 4:41 pm
by Chaos-Shaman
Saumun wrote: Wed Apr 25, 2018 4:27 pm I don’t know what is best. I’ve always used PNG for everything, and they’ve worked fine until finding that some don’t show on the magic map.
I only tried the 24bit BMP on a whim, and found that they work on the map where some PNGs don’t. They are bigger files, but it’s negligible for magic map icons because they’re so small.
I have had problems with files before. The only way to fix them was to delete it first and try again, think it has something to do with transparency.

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Wed Apr 25, 2018 6:12 pm
by terkio
Chaos-Shaman wrote: Wed Apr 25, 2018 4:41 pm
I have had problems with files before....... think it has something to do with transparency.
Using an hexadecimal editor as I suggested would locate fields that are wrong, it could very well be the fields that define "transparency" or "alpha blending".

Another suggestion:
Using a powerfull image editor like GIMP to inspect the properties of the PNG files. Hopefully it can access the wrong parameter(s) and fix it.

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Thu Apr 26, 2018 12:45 am
by Chaos-Shaman
terkio wrote: Wed Apr 25, 2018 6:12 pm
Chaos-Shaman wrote: Wed Apr 25, 2018 4:41 pm
I have had problems with files before....... think it has something to do with transparency.
Using an hexadecimal editor as I suggested would locate fields that are wrong, it could very well be the fields that define "transparency" or "alpha blending".

Another suggestion:
Using a powerfull image editor like GIMP to inspect the properties of the PNG files. Hopefully it can access the wrong parameter(s) and fix it.
GIMP is a program I spent years on learning, I know it well. I found the older version had no problem with their save files, the newer versions is when I had problems with inserting the files into RTC. I really don't know why so I delete those files and save again, most of the time that works. I do think it is alpha because problem png files are black.

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Thu Apr 26, 2018 11:39 am
by terkio
To really know what is going on with such weird file issues, an hexadecimal editor will show ALL there is in a file. On a png file, its format is simple enough.

Trouble can come from the access rights of the file, too. This is not IN the file and that is system dependent, environment dependent.

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Thu Apr 26, 2018 4:39 pm
by Chaos-Shaman
I'm not sure what editor you refer to, do you mean like Dmute?

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Thu Apr 26, 2018 5:15 pm
by terkio
Hexadecimal editors are general purpose tools to work at the lowest software level.
https://en.wikipedia.org/wiki/Hex_editor
There are plenty of them available.

Re: Magic Map icons PNG/BMP - Strange issue

Posted: Thu Apr 26, 2018 5:37 pm
by Chaos-Shaman
Thanks, I will read this. Not sure if I can use it but it will give me a better understanding of what you're referring to.