Knowing file size of saved BMP, JPG and PNG images

Just starting out? Need help? Post your questions and find answers here.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post by srod »

Yes, I do apologise.

Having now tracked down the original article which led to my confusion; I was mistaking NPFS (non-paged file system) for NTFS !!!

Doh!

@Trond : sorry lad! :wink:
I may look like a mule, but I'm not a complete ass.
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Anyway, it is hard to believe that headers or chunks info have nothing to say about the data length of the picture. :shock:
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
superadnim
Enthusiast
Enthusiast
Posts: 480
Joined: Thu Jul 27, 2006 4:06 am

Post by superadnim »

They do, you just misread the whole thing... He doesn't want to encode the images just to grab the size from the header or file itself, he wants to pre-calculate this information and the suggested method would be to use a pipe as a bridge to speed up the process, however you guys overlooked that most of the encoding time is lost on the processing of the raw data into the new format rather than in i/o operations.

You can't really estimate sizes for JPEG to any usable extent because of the nature of this lossy format. Same would go for any compression-enabled encoder, because you must analyze the data before you can perform assumptions with it.
Post Reply