I have to say the I don’t know much about how file formats work.
My question is say I have a jpeg file that is 200 px by 200 px, how can one calculate what the maximum size that file could be in terms of megabytes/bytes?
I think that the reasoning that led to the question will help some one answer me. I have a Java Applet the uploads Images that people draw with it to my server. I need to know what the max size that this file can conceivably reach. It is always going to be 200×200.
It sounds dumb but are there colors that take more byte size then others and if so what is the most expensive one?
As a rule of thumb, no JPEG is going to be larger than an equivalent size 32-bit bitmap. A 32-bit bitmap will have 4 bytes per pixel in the image, so multiply the dimensions together (200×200 = 40000), then multiply that by 4 bytes (40000×4 = 160000), and you’ll have an upper bound in bytes – for your example, 160000 bytes is approximately 156kb.