Ask for help:why do the NML keeps informing me that I had used pure white?

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
User avatar
ZeeChung子充
Engineer
Engineer
Posts: 2
Joined: 05 Mar 2020 08:48
Location: XuZhou, China

Ask for help:why do the NML keeps informing me that I had used pure white?

Post by ZeeChung子充 »

新建位图图像.png
(16.6 KiB) Not downloaded yet
Hello everyone! I've been learning NML recently, and something is borthering me: why do it consits that I had used pure white? I've used "almost white"(244,244,244) everywhere. I read the photo with winhex and searched for "FFFFFF" , but only found one, and I replaced it with"FEFEFE". Then the .png became availiable for photoshop, but can't be recongnized by the NML. I also tried to search for that pixel according to the coordinate, but found none. What has happened on the earth? Waiting for the solution. :(

User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5462
Joined: 13 Sep 2004 13:21
Location: The Moon
Contact:

Re: Ask for help:why do the NML keeps informing me that I had used pure white?

Post by PikkaBird »

I've used "almost white"(244,244,244) everywhere.
Apparently not. It doesn't really matter - the only reason not to use the pure white colour is that it does not (or did not with the 8bpp blitter) fade out correctly when displaying the end-of-game screen.
I read the photo with winhex and searched for "FFFFFF" , but only found one, and I replaced it with"FEFEFE". Then the .png became availiable for photoshop, but can't be recongnized by the NML.
When you hex edited the png you modified the palette, which NML wil complain about and which will make no difference in the encoded grf anyway. If you want to eliminate the pure white pixels from the image, use your image editor.

User avatar
kamnet
Moderator
Moderator
Posts: 7048
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: Ask for help:why do the NML keeps informing me that I had used pure white?

Post by kamnet »

You are warned about using pure white because it's typically what's used for the background color of the sprite sheet, and it indicates that your sprite alignments in your code may not match with where your sprite actually is in the spritesheet. It shouldn't prevent you from compiling a NewGRF, but when you use it in the game if the alignment is off it will be noticeable.

User avatar
ZeeChung子充
Engineer
Engineer
Posts: 2
Joined: 05 Mar 2020 08:48
Location: XuZhou, China

Re: Ask for help:why do the NML keeps informing me that I had used pure white?

Post by ZeeChung子充 »

All right, I see. Thank you so much! :)

Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 7 guests