I have a PNG or BMP image. I would like to know the file size of this image after compressing it in jpeg without saving jpeg .
So far I have done it as follows:
frameNormal.Save("temp.jpg", ImageFormat.Jpeg); tempFile = new FileInfo("temp.jpg"); filesizeJPG = tempFile.Length;
But due to the slow access to the disk, the program takes too much time. Is there a way to calculate the file size of a newly created jpeg? Like converting PNG to memory and reading size ...
Any help is much appreciated :-)
source share