Loading Unique image formats....

Started by
0 comments, last by SiCrane 17 years, 9 months ago
Hi, In many 2d games the images that are stored are stored in what seems to be a very unique image format. What i was looking to do was to somehow load these images and then pass them to directX functions so that i can display the data on screen. If anyone can suggest ways of converting unique files to a format that directX can utilise.. it would help me loads ^__^. I can already extract these files to edit them in paint etc... but i would like to be able to create my own unique format to protect the images from being stolen. The current format is as follows: header info containing: Amount of frames(for animations) Colour pallet in 16 bit(565) format(for reference to rest of file) Frame Info containing details such as: bytes to read for whole frames Image Dimensions Image Positioning for inside game The image also has a transparent colour of (in 16 bit format)63519. However, this is not located in the colour pallet.... instead it gives details whenever there should be transparent pixels, detailing the amount etc. Example: For each row their is 6 bytes detailing info about that row: GAPS(2 bytes) SPACES(2 bytes) PIXELS(2 bytes), if Gaps == 0 ... then a whole row is transparent. Gaps represents how many times after the pixel true pixel appears in that row that there are groups of transparent pixels. Spaces represents the amount of transparent pixels before the first pixel in the row. Pixels represents the amount of pixels to read after the first set of transparent pixels. If gaps > 1 then for each gap after the first set of pixels... there will be 4 more bytes detailing the spaces and pixels in the current gap. Thats about it.... Thank you to anyone that can help ^^
Advertisement
Cross post. Closed.

This topic is closed to new replies.

Advertisement