Thursday, October 3, 2013


     This came about when I was wondering why, some gim files weren't able to convert to png using gimconv. I found that gimconv had a -S option which has a portion that looks promising to me. it said "Pixels" followed by what looks like arrays of 4bytes. I immediately interpreted this as 32bit color (red, green, blue, and alpha). So the plan now was to take that array and make a PNG out of it, but I found another problem, the number of pixels in that array didn't match the width x height of the image. So I thought it was because the actual size of the image the pixels would form would be proportionally smaller than the stated width and height. That's when sandungas said he saw a pattern and that the image (at the time) was 36 x 44. And the math matches up. And so if you take the number of pixels / height (which we are assuming is correct) we should get the correct width. And so off I went, putting this little app together, then another problem arose, the order of RGB was different. I asked Ada to hand me a gim that was convertible using gimconv and from that I was able to match the colors (abgr if anyone was wondering), and there we have it. This program converts the gis files made from gimconv into png files. Although it works fine with files that can already be converted normally with gimconv, for files that wasn't able to convert with gimconv this program can convert the gis that was generated but it looks weird. And so I don't know if its correct or wrong (most likely wrong), or if we are missing something lol. Either way I decided to put this here even if it might be useless.

Usages: gis2png.exe <inFile>
            gis2png.exe <inFile1> <inFile2> <inFile3> ...
            Drag gis file(s) over application

Download :
MD5: 119936C018C9D1F6200558E17F514B52
SHA-1: BC27D25E0A180A98BA0E9776FD90C51F15CA7EC1

Here is a version that doesn't do the calculations to get width and uses the one found in the gis itself:
Download :
CRC32: FF75528C
MD5: 14B301C3C1C64962E9F8064C41C71C68
SHA-1: E1EDD51062A56E87407FF69EC82780C60AD93116

PS: No one listed will be responsible for the usage, and effects of this program, if there is room for correction/improvement, they might/might not be implemented.

No comments: