Obtaining Image Properties in ASP Without a Component
by johna | December 9, 2009 | Classic ASP Web Development
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:
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/.
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/.
Related Posts
Converting dBase IV programs to run in the browser
by johna | September 13, 2024
Some pointless entertainment trying to get some old dBase programs running in the browser.
How to set up a debugging using the Turnkey Linux LAMP stack and VS Code
by johna | December 19, 2023
The second part in my guide to setting up a website and database using the Turnkey Linux LAMP stack.
How to set up a website and database using the Turnkey Linux LAMP stack
by johna | November 18, 2023
If you need to host your own website for the purposes of web development, Turnkey Linux LAMP Stack is an easy to install all-in-one solution that you can set up on a spare computer or a VM (Virtual Machine).
Comments
There are no comments yet. Be the first to leave a comment!