Re: Sizing an Image
From: Bryan Reich [MSFT] (brreich_at_online.microsoft.com)
Date: 03/04/04
- Next message: Bryan Reich [MSFT]: "Re: Regional Setting may affect in query statement"
- Previous message: cb91766: "Re: Combo Box Error-Name with ' like O'Brien"
- In reply to: Edward Harford: "Sizing an Image"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 4 Mar 2004 15:02:23 -0800
This is a copy of a reply to a post in microsoft.public.access.modulesdaovba
that I answered (subject: When reading through files in a dir - can I get
size of jpeg's?). Hopefully it may provide a possible solution for you:
***** BEGIN COPY ****
Ok, this is not an ideal solution, but it might work for you:
Dim f As String
f = "myPicture.jpg"
Dim im As Object
Form_Form2.Image1.Picture = f
MsgBox Form_Form2.Image1.ImageWidth / 15
MsgBox Form_Form2.Image1.ImageHeight / 15
I've embedded an invisible picture control on this form and I use it to load
the image. I then ask it to give me the details on the image. The "/ 15"
converts the number it returns into screen pixels.
Hope that might get you closer. Post back if you still have questions.
-- Bryan Reich Microsoft Office -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Jesper F" <anonymous@discussions.microsoft.com> wrote in message news:8b6601c3e9aa$79e1d020$a501280a@phx.gbl... > I know how to read through a directory and place the file > names in a table. > But is it possible to read through a directory with image > files (jpg) and obtain the size/dimensions in pixels of > each image? > > Thanks for any help. ***** END COPY **** -- Bryan Reich Microsoft Office -- This posting is provided "AS IS" with no warranties, and confers no rights. Use of any included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Edward Harford" <eharford@apsconsortium.co.uk> wrote in message news:OKJFlWdAEHA.2036@TK2MSFTNGP12.phx.gbl... > I want to test the orientation and sizing of a jpg file from disk and the > create Image in a Word Document using Word Document object: > docWord.Shapes.AddPicture filename etc. > How can I test Height and Width of that file? > With thanks in advance > EHarford > >
- Next message: Bryan Reich [MSFT]: "Re: Regional Setting may affect in query statement"
- Previous message: cb91766: "Re: Combo Box Error-Name with ' like O'Brien"
- In reply to: Edward Harford: "Sizing an Image"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|