I guess that the image is being rasterized by FlexCel, and that might be the cause of the size increase.
The only vectorial file format that Excel understands is wmf/emf, so if the image is in other format it will be converted to png, which can have a bigger size. Also the resolution of the rasterizing might be too big, maybe when you do it directly on Excel it is giving the image a lower resolution.
Can you email me both the image and the excel/pdf files flexcel is creating to adrian@tmssoftware.com so I can try to find out more?
Do you want me to send the files directly to an email (which email?) of do you want me to send them via the Direct Support option in this site?
The original image is a .jpg
As a side note - when opening excel locally and creating a new file and adding the text and image manually - the file size remains under 300kb (basically its the size of the 165kb image, plus about 4kb or text plus whatever padding the excel file has.)
I' ve received the file, thanks. What is happening here is that this image has a different header and FlexCel isn't recognizing it as a jpg. So, as it does with any file format it doesn't recognize, it gets saved as png, which is a bigger file format (but that isn't loosy as JPG is).
I'll investigate why this image isn't recognized as jpg and let you know later.
For the record, file sizes if I manually make FlexCel recognize this as jpg are:
I am thinking that we will have to manually tell Flexcell this is a jpg.
The file is coming straight from a binary read from the database, so we have the mime type in a separate column, and maybe its lost in the binary header....
Just a follow up. FlexCel checks for a JFIF jpeg, but this is an Exif jpeg. I imagine it is footage coming raw form a digital camera.
I've modified already the code so FlexCel can now also detect exif and spiff jpegs, and I'll be uploading a build later today. I'll tell you once it is uploaded where to get it.