• Advertisement

Archived

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

More about JPEG file format

This topic is 6809 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

You would store the image uncompressed in a surface. Therefore, figuring out how much memory must be used is easy -- 640 * 480 * 2 (2 bytes = 16 bits) = 614400 bytes of memory.

-Nick

Share this post


Link to post
Share on other sites
Advertisement
It would probably take less to load them, because you are not reading in as much data, but then you'd have to decompress the image, which is likely going to be more processor intensive than just loading an uncompressed image.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
It depends on the method used to decompress. Most of the decent compression algorithms are pretty CPU-intensive, so you end up losing any time gained by reading less data from disk.

Share this post


Link to post
Share on other sites
How much memory would a 640x480x16b jpg file take up if it is loaded into a DDraw Surface?
Assuming the file size is 100k, but I don't think the file size has anything to do with this question.

Share this post


Link to post
Share on other sites
Hmmm - Possibly. The slowest process in any computer is I/O - so reading to and from disk will be the slowest operation (about 1000 times slower than memory reading if I can remember) So this is the major overhead. Except thatthis will probably only be an initial overhead as the OS (or your code) should read a large chunk of file into memory so unless you are reading n seperate files (open, read, close) rather than merge them you will have the data cached into memory anyway.

In general I would guess RLE is better - faster load on average from disk, smaller to download/upload/distribute and the processing power needed to decode is very minimal

Share this post


Link to post
Share on other sites

  • Advertisement