Hi good people,
I was experimenting with image control and different sized pictures (same picture, different dimensions) and I noticed that if the loaded picture is big (maybe 2k...or more), like a photo from a cellphone for example, the file size is just toooooo big.
The test: on my sheet I put an image control that is small, like 168x114 pixels (and i do not need to enlarge the picture).
It is like same sort of thumbnail, just a little bigger.
So I opened photoshop and I reduced the dimensions of one photo (jpeg) and saved it as it was, like 2200x1415px, then 640x480px, then 240x160px.
Aspect ratio differences are not notable.
I loaded the 3 pictures into the image control of 3 different excel files and saved them. Visually I cannot notice any difference.
Again, the size of the image control is the same in the 3 files.
So I got:
A) file with big photo (originally 120kb - 2200x1415px) = 4.4 Mb (crazy!)
B) file with medium photo (originally 18 KB - 640x480px) = 577 KB (better)
C) file with small Photo (originally 4.2 KB - 240x160px) = 112 KB (almost good)
I will have lots of pictures inside several image controls so I really need to resize the photos before insertion into the image controls.
And I cannot ask the user to do it in photoshop before inserting...
My question is: It is possible with Excel to resize the pictures to a small dimension BEFORE loading them, via VBA, into the image controls?
Is there some different workaround without using external software?
Thank everybody
Bookmarks