New GRF Help!
Moderator: Graphics Moderators
-
- Engineer
- Posts: 45
- Joined: 26 Dec 2006 12:12
New GRF Help!
Hi all.
I'm not sure if this is the right forum to post or whether it would be better in tech discussion, but...
I am currently working on my first ever New GRF but I have a little problem... I can't get it to compile! I am coding in NML and using the nmlc tool to (attempt to) create the .grf file.
So far, all the coding errors that have come up on compile I have been able to fix, but it keeps throwing up a "Cannot identify image file" error. The only time I was able to get it to compile successfully was when out of frustration I made the entire .png file "transparent" blue.
I created the PNG in Paint.net (using the right colours in the DOS palette) but after realising it couldn't create the required paletted file, I downloaded GIMP and the DOS palette for it. I then imported my PNG file into GIMP and converted it to indexed. For the life of me, I just can't figure out what's wrong with it!
I have attached the PNG file if anyone has any ideas!
Thanks in advance for any insights!
I'm not sure if this is the right forum to post or whether it would be better in tech discussion, but...
I am currently working on my first ever New GRF but I have a little problem... I can't get it to compile! I am coding in NML and using the nmlc tool to (attempt to) create the .grf file.
So far, all the coding errors that have come up on compile I have been able to fix, but it keeps throwing up a "Cannot identify image file" error. The only time I was able to get it to compile successfully was when out of frustration I made the entire .png file "transparent" blue.
I created the PNG in Paint.net (using the right colours in the DOS palette) but after realising it couldn't create the required paletted file, I downloaded GIMP and the DOS palette for it. I then imported my PNG file into GIMP and converted it to indexed. For the life of me, I just can't figure out what's wrong with it!
I have attached the PNG file if anyone has any ideas!
Thanks in advance for any insights!
- Attachments
-
- A Set.png (23.57 KiB) Viewed 2145 times
Re: New GRF Help!
Your png file is malformed enough for Pillow (the image library used by nmlc) to complain about it. Pillow is usually pickier than image viewers, so it still renders in Gimp and other programs. Re-exporting your image as png in Gimp (2.10.10) fixed the problem on my machine.
Edit: I managed to get the error myself by selecting both "Save color profile" and a combination of other export settings in the Gimp png export dialog. It's probably related to this bug: https://gitlab.gnome.org/GNOME/gimp/issues/2111. Uncheck "Save color profile" if you had it enabled.
Edit: I managed to get the error myself by selecting both "Save color profile" and a combination of other export settings in the Gimp png export dialog. It's probably related to this bug: https://gitlab.gnome.org/GNOME/gimp/issues/2111. Uncheck "Save color profile" if you had it enabled.
-
- Engineer
- Posts: 45
- Joined: 26 Dec 2006 12:12
Re: New GRF Help!
Ok, I will try it out tonight when I get a chance. Thankyou for your help.
Re: New GRF Help!
As an alternative, you could also try coding your NewGRF for 32bpp, which basically gives you a 24 million color palette, and should thus end the complaints.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: New GRF Help!
You'd still need to provide 8bpp sprites so you just added more complexity, instead of removing it.kamnet wrote:As an alternative, you could also try coding your NewGRF for 32bpp, which basically gives you a 24 million color palette, and should thus end the complaints.
Re: New GRF Help!
Also, with saving in GIMP, don't forget to turn off "remove unused and duplicate colors" (or something to that effect) when switching modes to Indexed. That saves only the palette color actually used instead of the full palette, which causes NML to complain about incorrect palette.
Re: New GRF Help!
Well, only if you care about company colors...Erato wrote:You'd still need to provide 8bpp sprites so you just added more complexity, instead of removing it.kamnet wrote:As an alternative, you could also try coding your NewGRF for 32bpp, which basically gives you a 24 million color palette, and should thus end the complaints.
... which, now that I think about it and looked at the graphics, probably does care about it...
... ooops.
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
-
- Engineer
- Posts: 45
- Joined: 26 Dec 2006 12:12
Re: New GRF Help!
I re-exported without color management as you suggested and that fixed my problem. Many, many thanks!
Who is online
Users browsing this forum: Bing [Bot] and 11 guests