Archived

This topic is now archived and is closed to further replies.

RAW files?

This topic is 5572 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Another possibility is to create uncompressed 24-bit TGA files and take out the first 18 bytes. (don''t replace them by 0s, take them out completely, offset 0x12 becomes 0x00, 0x13 becomes 0x01, etc.)

- JQ
Full Speed Games. Coming soon.

Share this post


Link to post
Share on other sites
JonnyQuest:

I''d actually suggest using the binary version of the .PPM file format if you want to strip the header to get a raw file. TGAs have footer and extra optional header data and could also have palette and vendor info (gamma ramps, creator info, etc)

PPM is basically raw data with a really simple ASCII header.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
quote:
Original post by S1CA
JonnyQuest:

I''d actually suggest using the binary version of the .PPM file format if you want to strip the header to get a raw file. TGAs have footer and extra optional header data and could also have palette and vendor info (gamma ramps, creator info, etc)

PPM is basically raw data with a really simple ASCII header.


Well, that''s great, but most of the time that header isn''t used anyway, (especially if you have a rubbish graphics program) and you usually don''t have PPM support if you don''t have RAW, while TGA is extremely widespread. Personally, I use my own proprietary format (similar to DDS, but supports animated textures and explicit bump maps) and I would usually not strip the header of a TGA to get RAWs either - it was just a suggestion for a "quick fix". As for the footer: to load a RAW, you need to know something about the format and image size anyway, so you can just read until the end of the pixel data.



- JQ
Full Speed Games. Coming soon.

Share this post


Link to post
Share on other sites
JonnyQuest:

I wasn''t criticising - just adding an extra suggestion on top of yours that it''s easier to strip the bitmap contents of a PPM than it is to strip the bitmap contents of a TGA.

IMO stripping TGAs would be the way to go if you needed 32, 16 or 8bit support rather than 24.

Though of course the better solutions, as noted are either your own custom format, using a reader for common formats (for example FreeImage) or finally using a freeware converter (a good search term for Google would be "BMP2RAW" or similar *2RAW terms).

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites