Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine JPG size in pixels?
Is there a way to determine the size of a JPG file in pixels? I need
to put product pictures on a spreadsheet programmatically. I would like their size to be as close as possible. So I have to know their size to determine how much to scale. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine JPG size in pixels?
I expect the data is buried in the JPG file somewhere, but I wouldn't bet on any Excel experts
knowing much about graphics files. Have you posted this in a newsgroup that deals with graphics (I don't think MS has any, but I could be wrong)? On Wed, 24 Sep 2003 12:05:21 -0700, dchow wrote: Is there a way to determine the size of a JPG file in pixels? I need to put product pictures on a spreadsheet programmatically. I would like their size to be as close as possible. So I have to know their size to determine how much to scale. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine JPG size in pixels?
Hi,
You can get the picture height & width like this. Sub Macro2() Dim MyPic As IPictureDisp Set MyPic = LoadPicture("C:\Documents and Settings\jaf\My Documents\My Pictures\020108-M-8634P-502.jpg") Debug.Print MyPic.Width, MyPic.Height End Sub Or you can assign a height & width like this. LoadPicture([filename], [widthDesired As Long], [heightDesired As Long], [flags As LoadPictureConstants = Default]) As IPictureDisp -- John johnf202 at hotmail dot com "dchow" wrote in message ... Is there a way to determine the size of a JPG file in pixels? I need to put product pictures on a spreadsheet programmatically. I would like their size to be as close as possible. So I have to know their size to determine how much to scale. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to determine JPG size in pixels?
That's right. I will try to find the JPEG file format. Thanks.
On Wed, 24 Sep 2003 21:58:31 -0500, Myrna Larson wrote: I expect the data is buried in the JPG file somewhere, but I wouldn't bet on any Excel experts knowing much about graphics files. Have you posted this in a newsgroup that deals with graphics (I don't think MS has any, but I could be wrong)? On Wed, 24 Sep 2003 12:05:21 -0700, dchow wrote: Is there a way to determine the size of a JPG file in pixels? I need to put product pictures on a spreadsheet programmatically. I would like their size to be as close as possible. So I have to know their size to determine how much to scale. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to determine what is causing large size | Excel Discussion (Misc queries) | |||
How to change column pixels to the standard size? | Excel Worksheet Functions | |||
Size of column in pixels | Excel Discussion (Misc queries) | |||
Determine size of listbox | Excel Discussion (Misc queries) | |||
some columns 30 characters 155 pixels others 310 pixels why | Excel Discussion (Misc queries) |