Author Topic: Question RE: .PNG image format  (Read 1714 times)

Latro

  • Sergeant
  • *
  • Posts: 197
  • I only ride 'em, I don't know what makes 'em work.
Question RE: .PNG image format
« on: 08 August 2017, 08:37:18 »
Hello!

Been awhile since I checked in (been actively trying to stay away from the the keyboard - it's good for the soul).

I just D/L'd the latest dev 43.3 and noticed that the unit image file format of .gif was migrated to the .png format.

I have a fair number of custom units and home brewed images that I created to go along with them. After I modified the mechst.txt file to include the images and started MM 43.3 I noticed that the old .gif files can no longer accept a camo scheme.

So two Questions:

1) Is there a way to easily modify MM to allow the old .gif images to have a camo scheme over-layed?

or

2) Do I need to convert my old .gif images into .pngs?

2a) There's a lot of nifty shadowing going on in the .pngs - just an artistic touch I'm assuming, however as silly a question as it seems when I ask - is it necessary for the .png images.

2b) Not yet familiar with .png images - how does one create/choose the backgrop color which went null in the .gif images?

(ok - three Questions... FOUR! Four questions. I'll bet you didn't expect the Spanish Inquisition!)

Thanks in advance and THANK YOU for the amazing work you guys do here!
time is meaningless, and yet it is all that exists...

Schugger

  • Master Sergeant
  • *
  • Posts: 267
Re: Question RE: .PNG image format
« Reply #1 on: 08 August 2017, 08:49:48 »
You should always expect a MP quote on internet forums, but this one caught me unaware. I'm, getting old I guess :D
"Shit!"
"What?"
"Clanners!"
"No!"
"Yep."
"Shit!"

Latro

  • Sergeant
  • *
  • Posts: 197
  • I only ride 'em, I don't know what makes 'em work.
Re: Question RE: .PNG image format
« Reply #2 on: 08 August 2017, 09:06:41 »
Quote
You should always expect a MP quote on internet forums, but this one caught me unaware. I'm, getting old I guess :D

Just Keeping you on your toes...
time is meaningless, and yet it is all that exists...

Latro

  • Sergeant
  • *
  • Posts: 197
  • I only ride 'em, I don't know what makes 'em work.
Re: Question RE: .PNG image format
« Reply #3 on: 08 August 2017, 09:09:51 »
EDIT/Update:

Been farting around using MS Paint to remove the background colors and then reformat the old .gif files into .png's. I can get the image to load in MM, but still no camo overlay.

I just have to say - who ever took the time to 'airbrush' ALL the existing images - my hat is off to you. That must have take some time!
time is meaningless, and yet it is all that exists...

arlith

  • BattleTech Volunteer
  • Warrant Officer
  • *
  • Posts: 698
Re: Question RE: .PNG image format
« Reply #4 on: 08 August 2017, 10:01:40 »
The shadows were done with a script.

GIFs should work with camo the same as PNGs.  There was a change to allow colors within the unit icons (there are some icons now that express this, but this work can't be done by a script, so it's much slower going than the shadows).  Any pixel within a icon icon that has different values across the color channels will be considered a color, and ignored for purposes of camo.  So, it might be possible that the pixels in your GIF that you want to be camoed, don't have the proper pixel value.

One difference between PNGs and GIFs is that PNGs support an alpha channel for transparency, so you don't have a specify one "transparent" color like you do with GIFs.
Member of the MegaMek Team.

Hammer

  • Numerorum Malleo
  • Global Moderator
  • Major
  • *
  • Posts: 4134
    • MegaMek Website
Re: Question RE: .PNG image format
« Reply #5 on: 08 August 2017, 10:24:45 »
2) Do I need to convert my old .gif images into .pngs?
No, in fact when Deadborder sends me his sprites they are in GIF and I convert them to PNG using GIMP which has a bulk conversion utility making it super easy.

2a) There's a lot of nifty shadowing going on in the .pngs - just an artistic touch I'm assuming, however as silly a question as it seems when I ask - is it necessary for the .png images.

ColonelSandersLite wrote scripts for GIMP that automatically shade the units.  They are over on our forums - https://www.megamek.org/bb/thread-2295.html
MegaMek Projects Wiki
Bug Trackers
MegaMek Tracker
MekHQ Tracker
MegaMekLab Tracker
New Units and RAT's aren't added until after the 2 month release moratorium is passed.
Join the official MegaMek Discord

Latro

  • Sergeant
  • *
  • Posts: 197
  • I only ride 'em, I don't know what makes 'em work.
Re: Question RE: .PNG image format
« Reply #6 on: 08 August 2017, 11:37:09 »
No, in fact when Deadborder sends me his sprites they are in GIF and I convert them to PNG using GIMP which has a bulk conversion utility making it super easy.

I just D/L'd GIMP and did a test conversion. Seems to have worked!

Awesomeness!

Thank you!
time is meaningless, and yet it is all that exists...

 

Register