ID:1558448
 
This is a question for the developers, in the latest version of BYOND, how are the files read/saved to a .dmi file?

I am asking because I am making a viewer which should be able to read the image, state, and delays of frames and the like from the file for viewing, and also allow export of multiple icons at once.

If you export now, it says it will lose some information which basically means you lose all the information because it only saves the one state, now the tool will allow you to export similar to a spritesheet on one image, or export as multiple files.

I just need to be able to read the files first, but I don't know how their read/saved to know how to go about reading them myself.
It's just a PNG, with a zTxt section that describes the frames, icon_states etc. If you extract that zTxt section, it should become apparent.
Really, just a PNG, so why can't paint open the files even when the file extension is changed to PNG?
Open Paint, click and drag a .dmi to the canvas and it opens fine. As does opening them regularly.
Okay, upon further testing some of my files will open fine in paint and others not at all, the same with my program opening them...but others not at all, does anyone here know why that may be? All the icons even if they were old were told to upgrade to the new file format by the way.
Perhaps you should provide the files before they were upgraded, that didn't work.
The files in question I used as a sample were from the RoH source at byond://Xerse.RiseofHeroesSource

They are not working before or after the v3 to v4 dmi upgrade. (Such as players.dmi being one of them.)
Can you upload the files to a more accessible source?
You want just the images, and you want them in a zip or as separate files?

Anyways I know wordpad isn't the best thing to see these things, but I opened using notepad all these files...the ones that would work, showed they were PNG on the first line, and open fine in paint, the others said DMI on the 1st line...

Is there a proprietary file format DMI is using sometimes, or did they fail to upgrade properly...but doesn't tell me as much or what's the issue?
Seems more likely a failure to upgrade. And as a ZIP is fine.
If they are old-style DMI and won't load, that is a bug since we should support those. Save those files and we can take a look.
OK since you said it's a failure to upgrade I tried creating a new file and copy+pasting the states in, when I did that it worked fine now...

It popped up asking to upgrade once, I kept clicking save and it was fine, not popping up again, but now that I re-opened Dream Maker, it's asking again...

Yea, it's just a failure to upgrade...but it does seem odd to me why some of the old v3 are in like a different format paint can understand, and some of them aren't, all the v4 icons though seem to be working fine though, now that I got it to upgrade using copy+paste into new files.
In response to Tom
@Tom They weren't opening in paint, I am trying to create a program that can understand the files...and not all the files would come up, this has nothing to do with what is read by Dream Maker, Dream Maker is reading everything OK.

Sorry for any confusion there.