Magic Map icons PNG/BMP - Strange issue

Questions about how to create your own dungeons and replacement graphics and sounds.

Moderator: George Gilbert

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
User avatar
Saumun
High Lord
Posts: 2238
Joined: Fri Feb 20, 2009 3:03 am
Location: The Ether

Magic Map icons PNG/BMP - Strange issue

Post 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?
“Grynix Ernum Quey Ki Skebow Rednim U Os Dey Wefna Enocarn Aquantana” - Anon
User avatar
terkio
Mon Master
Posts: 937
Joined: Tue Jul 10, 2012 8:24 pm

Re: Magic Map icons PNG/BMP - Strange issue

Post 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.
"You can be on the right track and still get hit by a train!" Alfred E. Neuman
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Magic Map icons PNG/BMP - Strange issue

Post 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.
keep your gor coin handy
User avatar
Saumun
High Lord
Posts: 2238
Joined: Fri Feb 20, 2009 3:03 am
Location: The Ether

Re: Magic Map icons PNG/BMP - Strange issue

Post 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.
“Grynix Ernum Quey Ki Skebow Rednim U Os Dey Wefna Enocarn Aquantana” - Anon
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Magic Map icons PNG/BMP - Strange issue

Post 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.
keep your gor coin handy
User avatar
terkio
Mon Master
Posts: 937
Joined: Tue Jul 10, 2012 8:24 pm

Re: Magic Map icons PNG/BMP - Strange issue

Post 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.
"You can be on the right track and still get hit by a train!" Alfred E. Neuman
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Magic Map icons PNG/BMP - Strange issue

Post 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.
keep your gor coin handy
User avatar
terkio
Mon Master
Posts: 937
Joined: Tue Jul 10, 2012 8:24 pm

Re: Magic Map icons PNG/BMP - Strange issue

Post 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.
"You can be on the right track and still get hit by a train!" Alfred E. Neuman
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Magic Map icons PNG/BMP - Strange issue

Post by Chaos-Shaman »

I'm not sure what editor you refer to, do you mean like Dmute?
keep your gor coin handy
User avatar
terkio
Mon Master
Posts: 937
Joined: Tue Jul 10, 2012 8:24 pm

Re: Magic Map icons PNG/BMP - Strange issue

Post 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.
"You can be on the right track and still get hit by a train!" Alfred E. Neuman
User avatar
Chaos-Shaman
High Lord
Posts: 2642
Joined: Wed May 03, 2006 7:26 pm
Location: The Gates of Hell

Re: Magic Map icons PNG/BMP - Strange issue

Post 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.
keep your gor coin handy
Post Reply