LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding picture stats with VBA?


I'm trying to write a loading program for pictures using VBA in Excel.
I've written some code that can preview a picture in Excel (opens the
picture and resizes it and stuff):

Set ThisPic = .Parent.Pictures.Insert(PicPath & PicName)
'shrink image until it's within a 200px box
ShrunkWidth = ThisPic.Width 'in points. divide by .75 to get
pixels
ShrunkHeight = ThisPic.Height 'in points. divide by .75 to get
pixels
Do Until ((ShrunkWidth / 0.75) < 200) And ((ShrunkHeight / 0.75) <
200)
ShrunkWidth = ShrunkWidth * 0.9
ShrunkHeight = ShrunkHeight * 0.9
Loop
ThisPic.Width = CInt(ShrunkWidth / 0.75)
ThisPic.Height = CInt(ShrunkHeight / 0.75)

Basically, the user can select a bunch of files, and each file name
gets put into a little table with a preview button next to it, which
runs the above code. The table also has fields like Image Width and
Image Height (which are nice to know when you're uploading an image).

Now, I can easily pull the width and height out of the picture AFTER
I've loaded it into Excel. My question is whether there's a way to find
the image information without actually loading the picture... I'm
writing this for an aerial imaging company and there can be lots of
large images. I'd like to give people the option to preview a picture,
but previewing all the pictures would be very cumbersome.

Thanks!


--
GerbilGod7
------------------------------------------------------------------------
GerbilGod7's Profile: http://www.excelforum.com/member.php...o&userid=13073
View this thread: http://www.excelforum.com/showthread...hreadid=539985

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Historical Stats mpenkala Excel Discussion (Misc queries) 1 April 2nd 09 08:26 PM
stats from data GQ Moh Excel Discussion (Misc queries) 6 September 10th 06 02:42 PM
Finding picture stats with VBA? GerbilGod7[_7_] Excel Programming 0 May 8th 06 08:28 PM
Help!! NEW Conundrum for stats!? hoganc Excel Discussion (Misc queries) 0 May 8th 06 03:06 PM
Football Stats: PanamaAz Setting up and Configuration of Excel 0 September 1st 05 07:07 PM


All times are GMT +1. The time now is 08:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"