<img src="www.mywebsite.com/img/1.jpg" width="32px" height="32px"/>
Will return 32px even though the image might be 900px x 900px. This approach will only work if you do not put the size inside the image.
One solution to this is to run the code on the server. This will provide the actual dimensions. From there you can actually continue processing it or return a message that it needs to be the right size.
//Put the uploaded image into an image object Dim UploadedImage as System.Drawing.Image = System.Drawing.Image.FromStream(UploadedFile.PostedFile.InputStream) //Capture the width and height of uploaded image Dim UploadedImageWidth as float = UploadedImage.PhysicalDimension.Width Dim UploadedImageHeight as float = UploadedImage.PhysicalDimension.Height If...... end if
Looking for quality web hosting? Look no further than Arvixe Web Hosting!