You can't. There's no reason to expect JPG file sizes will remaing the same when you are processing them. JPG is a compression method, and when you save a JPG, it gets compressed according to the algorithm, thus changing the file size. So the idea of obtaining the same (or even similar) file size after such a processing operation is one you should discard.
Are we talking about loss of resolution or number of bytes? If you don't want to lose resolution you need to create the pic as a tif or psd. Each time you save a jpg(being a lossy format) the resolution decreases as does the file size.
The original question dealt with file size. You seem to be changing the question to resolution or number of bytes.
Each time you save a jpg(being a lossy format) the resolution decreases as does the file size.
Saving a JPG keeps the exact same resolution and the exact same number of bytes.
Furthermore, you can save a JPG at a high quality level (like 10 11 or 12) and get a LARGER file size.
Do an experiment on a jpg picture. Note the size of the original, do a nominal change and save it again and you will see a loss in size which affects resolution. I saved a jpg 4 times and it started at 8.4M, ended up at 6M, at a 12. I stand by JPG is a lossy format and affects resolution.
It does not affect resolution. You are not using the word properly. The number of pixels remains the same. The resolution remains the same. The file size decreases. File size and resolution are not the same.
If the photo was 3000x2000 pixels, and 300ppi, and you perform your experiment, the final photo is still 3000x2000 at 300ppi, the resolution and number of pixels has not changed.
We are both right in our own ways. I was wrong on resolution but if you do too many saves as a jpg it starts affecting the picture quality. The original question was regarding file size(which I interpret to mean physical file size) and you can only maintain the file size if you convert to a tif or psd, yes it will be a larger file but when converted back to jpg the file size would probably be close to the original.
if you do too many saves as a jpg it starts affecting the picture quality
Which was never a point of debate here
you can only maintain the file size if you convert to a tif or psd, yes it will be a larger file but when converted back to jpg the file size would probably be close to the original
A totally pointless thing to do; and furthermore I dispute your statement that it would "probably be close to the original" as the files size when converting a TIF or PSD to JPG depends on a lot of things, including the quality chosen by the user and the photo content
But I guess we're really going off into the weeds here.