gif animation files... is there a way to dissect it?

Started by
17 comments, last by mickey 22 years, 3 months ago
Nice program (and nice name) Beer-Hunter.

Re. irfanview: Another really cool thing it does is batch conversions.
Beer - the love catalystgood ol' homepage
Advertisement
irfan view?!?!? i have that!!! i just used that to view pictures here, do you mean it can extract frames? how??!?! okey am gonna look at it now... thanks!!!

i also have msgif animator but it doesn''t extract frames,

can windows read other file formats like jpg gif etc.? if so how? i mean are is also LoadImage(....)?

i don''t wanna use bmp or is there a way i can hide my picture files so people won''t see it? like if i give my game to someone, he wouldn''t know those were the graphic files?


http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
dredgemaster!!! thank you thank you! i just tried irfan view and i found out under option there is this extract frames! that''s what am being looking for in a software thanks very much!!!

btw, regarding my other two quesiont,

can windows read other file formats like jpg gif etc.? if so how? i mean are is also LoadImage(....)?

i don''t wanna use bmp or is there a way i can hide my picture files so people won''t see it? like if i give my game to someone, he wouldn''t know those were the graphic files?
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
Well, you can make up your own data container sort of file.


When I was working with the Build engine games and when I was on the latest Duke3d team, I wrote some utils that used Ken Silvermans "kens group" format. All the build games that had a single storage file used this.

Basically it was a big file (pretty obvious)
first bit was the header of "KENSILVERMAN"
then there was an integer for the version number

then a long saying how many files were in it - lets call this x

now there was a structure like this
struct{
char filename[14] (it was dos)
long filestart
long filelength
}
and it was in there x times
struct[x]

then all the files were placed into it.


That is one way you can do it.

Another way is you can make your own format. If you are using BMP files, you can just strip the header off it.

You can try some basic encryption if need be, or place them all in a cabinet or even a rar file (source for unrar is free) and use a password on it. Lots of solutions. Oh yeah, if you use unrar, I don''t think you are allowed to for commercial programs.



Regarding the other formats. The only one that is in glaux is for the BMP files.
BUT you can write your own or download libraries for the other formats.
I personnaly use PNG files using libpng and zlib from www.libpng.org (people who created the format in the first place).

My projects that I use now either load BMP (using auxdibloadimage) or my own (auxpngloadimage). I also set up an auto detect and search function so it can''t find the file, it will search for a similar png file, if it fails, then it searches for a bitmap file. If it finds an unknown file it checks its format.

I am planning to upload the source and library for my one some time soon after I check it completely, and write my own dib loader so it won''t require opengl to load the images.


libpng is easy to use

others I haven''t tried but I know exist are
libgif
libjpeg

I have downloaded jpeg, but I haven''t bothered to check its license. PNG (using the original PNG code) is completely free for any purpose, so it is a safe bet if you get it working.

Also, PNG (and MNG, but MNG is still a testing format) are lossless compression, so you don''t loose any quality on the image at all, meanwhile with gif and jpeg you do.

Here is a link to a png image (of a music CD).
http://members.optushome.com.au/jlferry/discs/kilkenny.png

PS - yes that is an audio CD, and yes it does work.


Oh you can also try TGA, but I never use them so I don''t even know if it can compress an image or not.


Beer - the love catalyst
good ol'' homepage
Beer - the love catalystgood ol' homepage
whew! it took me so hard to decipher what you just explained, so basically, according to you, for example, i could have one really big file then all my bmps are stored their so basically a windows paint wouldn''t be able to open that coz it''s a different file format!

but but... how does someone do that? dredge master, if you could provide a link or a link to a source code pls if you can provide one, i really wanna learn that style,

p.s, is this what hackers do? break into your files?

i''m sorry it''s just that i don''t know how to do it really, i know just that you use C commands like fopen etc., but how?
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
Yes, I have had people try (and in some places succeed on the less protected ones) to get into file formats and stuff for various things I have made/released a while back. By the old terms some were hackers, the others were "3l33t" newbies or whatever they are called.


Well anyway, about that format I explained above, it is actually very simple to pull the info out of if the person looking at it has the faintest idea what they are doing (well not the faintest but you get the drift)

source code for the above is included with any build game as far as I know. It is with Duke3D and New World IV atleast.

Otherwise, try this site. This is Ken Silvermans homepage. The source for his group files should be in the build source distribution.

While you are there, check out his voxel engines, 6dof with good res (I ran it 1280x1024) and high fps (at 80fps on a p100).


here is is link to Ken''s site
http://www.advsys.net/ken/


There are others, and when I make them now I use my own code for his group format (same format, faster code).
After you compile his kextract and kgroup and test them, the first thing you should do is change his buffer size. don''t use the 32k. You have lots more ram available, so beef it up (either keep it below 640 or go for broke and make it a few meg if you are dealing with bitmaps).

If you can''t write your own code of the extraction of images and stuff, it is pretty simple, just find the starting position of it in the group file. If you are still stumped, look in the code for his editor and game. Should be in there somewhere.


Beer - the love catalyst
good ol'' homepage
Beer - the love catalystgood ol' homepage
Oh if you want a more secure format, just use an encrypted CAB file or if you can fork out the cash, buy a license and use RAR. It will also make it smaller as these compress rather well, and extract reasonably fast.

There is zip stuff on kens page too (link previous post) I think. His has no limit on the compressor so it makes the files really small, but takes quite some time to compress them.

Another option is either to bit shift them (not to slow) or use an encrypted random format system, which has the benefits of both encryption and confusing whoever is reading it.


Beer - the love catalyst
good ol'' homepage
Beer - the love catalystgood ol' homepage
dredge master, wow, you really invested a lot of time teaching me here, and thank you very much. anyway i understand now what really is the meaning of ''make your own file format'' that is, there are various way to do it, and what you posted here is teaching styles how to do it, now my only problem is, implementing it, again thanks very much!
http://www.dualforcesolutions.comProfessional website designs and development, customized business systems, etc.,
No problem at all. I don''t mind helping people, and since it is holidays at the moment, spending half an hour browsing the forums isn''t much. Otherwise I just hang around with friends, get drunk, watch movies and goto work.


If you want to see the implementation of it, try the above site I posted, with the kextract and kgroup code. They are very small and really simple to follow. Best to learn by example then spend half a day figuring it out for yourself.

Seeya,
James.


Beer - the love catalyst
good ol'' homepage
Beer - the love catalystgood ol' homepage

This topic is closed to new replies.

Advertisement