Results 1 to 13 of 13

Thread: How do i compile images

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Location
    Puerto Rico
    Posts
    19

    How do i compile images

    I want to compile images in some sort of resource file... like an msagent character file.

    but i dont want to add it to my project... instead i want to have it as a separate "character file" for loading it at runtime

    Any ideas?

  2. #2
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    You could always just create your own "format" for storing the data in one file. Such as having the beginning of the file store where the split points are, and IDs for the files. Then, when your program is run, split the file apart for temporary processing. Or else, split out the file needed for the current process.

    In this way, you could also write a custom compressing procudure, to also reduce the file size slightly, ecentilly creating your own zip file. Even without the compressing, the files would take up slightly less space as you wouldn't lose the slight amounts from the 4KB fat size (that is on NTFS and FAT 32; its 8KB on FAT; all files must be a mutiple of this size).
    Involved in: Sentience

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Location
    Puerto Rico
    Posts
    19

    Question Thanks

    I was thinking i would have to do something of that


    But then that towards me to some other questions like

    1) Do I Just Open the Files for binary INPUT and drop them in a second file? (recording the split sections) or does the operating system have some kind of spec table of its own, that i dont have access to this way, to store information of the file like name and description (like in the property tabs)

    2)Is there some api or object you know that can do this for me?

    3)Compression, Compression... how to do it? even some basic one


    THANKS IN ADVANCE ... I know this are a lot of questions for a single thread... any help is greatly apretiated any thing i can help (jajaja i can't be sure is enough) i will.

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    There is a free zipping library that you can use, called gZip. It's free... all I can remember is it's website looks like a PNG website or something like that
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  5. #5
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    There's the bugger!

    http://www.gzip.org/zlib/
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Location
    Puerto Rico
    Posts
    19

    Thanks Sastraxi

    Thanks Sastraxi

    I am having a look on it now.. This is just what i need at the moment... but i surely would like to know at least about the general idea of compresion and about how window stores files... any references would be apretiated.


    Thanxs Satraxi.. great work, you do here

  7. #7
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    I can't help you with the basics of compression except for the following two statements: 1) It makes the data take up less room (aka Compresses), and 2) it takes code.

    And don't bother to state that the information about compression I just posted is completely useless (not to mention obvisis)...
    Involved in: Sentience

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Just a curiousity question: why not use a resource file and compile it with your program?

  9. #9
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    I would guess that it has to do with updating.
    Involved in: Sentience

  10. #10

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Location
    Puerto Rico
    Posts
    19

    why

    i want the users to make "characters" (animated by the images i want to compile) and save them and even share them...

    most of all im interested in my own "character" Format

  11. #11
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Yes, with your own you can save stats such as walking speed and such in a header portion of your bitmap, which would be a cool idea. Also, if you just leave it as an area you put text in, you can add stuff in the future and won't have to add too much more code.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  12. #12
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134
    Compression is basically the "art" of taking something and putting it into smaller size, whether it be lossy or lossless.

    An example of lossy - JPEG, DivX, MPEG.
    An example of lossless - GIF, PNG, ZIP, RAR.

    With data, you can't use lossy compression techniques - the data must match the input bit by bit or the information will not be as expected. It works for auditory and visual means however, because it does not contain script or code, and the eyes and ears can be fooled by subtle effects.

    While I won't get into too many details here, lossless compression is simplifying repetition/redundancy into one passage, so it only appears once in the file. Of course, since this directly moves and modifies the code you won't be able to run it without decompressing it first.

    I'm sure howstuffworks.com will have an article (or already has a section!) on compression.
    All contents of the above post that aren't somebody elses are mine, not the property of some media corporation.
    (Just a heads-up)

  13. #13

    Thread Starter
    Junior Member
    Join Date
    Aug 2001
    Location
    Puerto Rico
    Posts
    19
    Thanxs again

    Ill be reading howstuffworks.com article soon...

    right now im am on finals...

    but ill use this information to make my program and ill make it accesible thru here...... I can always use constructive criticism

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width