Blog Tools
Edit My Blog
RSS Feed RSS
About Me
Contact Me

< < Dec 2009 > >
S M T W T F S
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
You are not signed in.
Sign in

Entries By Topic
·All Topics RSS
·Classic ASP RSS
·CSS RSS
·Databases RSS
·eBay/PayPal RSS
·General RSS
·Hardware RSS
·Web Security RSS
·Windows XP RSS

Search
 
Recent Entries
·Classic ASP Master Pages
·eBay encourage/force you to lose money on postage
·CAPCTHAs and alternatives
·Obtaining Image Properties in ASP Without a Component
·New Microsoft Hotmail good reason not to use Microsoft Explorer
·Why are most real estate agents so bad at selling online
·Classic ASP Title Case
·Does stopfax.com.au really stop junk faxes?
·SQL Injection Protection - b.js
·Unfair eBay fees for used cars

John's Technology Blog

Obtaining Image Properties in ASP Without a Component

Posted at: December 9, 2009
Related Topic(s): Classic ASP

Click here for daily freebies, competitions, surveys and the best offers - OUTPOSTOFFERS.COM - Australia

You don't need a third party server component to determine the height and width of an image file in Classic ASP. The LoadPicture command will load an image into and object and you can then access the height and width, such as in this example:

Dim objImage
Set objImage = LoadPicture(Server.MapPath("image.ext"))
intWidth = objImage.Width
intHeight = objImage.Height

4GuysFromRoll.com has an interesting article on resizing images without a component - see http://www.4guysfromrolla.com/webtech/050300-1.shtml.

The following link contains some other code that can access image properties as well as modify GIF images: http://www.u229.no/stuff/.

Lastly the following link is for a component-less CAPTCHA genertor which generates a BMP image from ASP.It may help you understand how to create and modify BMP files. See http://www.tipstricks.org/.

View Comments (0) | Add Comment | Permalink

Newer | Latest | Older

Free automotive classifieds, reviews, etc

Car and motorcycle books and repair manuals

ASP Hosting and Domain Names

For cheap asp and asp.net hosting I recommend CrystalTech, for cheap .com domains Cheeky Domains, or for .com.au domains Name Scout.

[Oztion is an Australian auction website which offers no listing fees]