Size of image file (object) in disk before saving, using VBA

174 views Asked by At

I have an image file (object) on which I will apply WIA.ImageProcess filters, and save the filters (transformed) file.

I want to find the size of the file before it is saved as a real image (png/jpg/jpeg) file, from the VBA object itself.

In documentation, I found:
Size of file = (pixel Height of image) * (pixel Width of image) * (Bit Depth[mostly 32])

This formula is not giving the kb/mb value shown in the Windows file properties section.

How do I find the size of file in disk before saving the file (inside VBA).

As a workaround I save these images to the temp folder, get the sizes and delete them.

0

There are 0 answers