0

I used to use the e-kov picturepreviewer.dll to extract image dimensions and details about uploaded image files. Even though I've registered the dll on my new Win 2016 server, it keeps throwing an error "object required". My question is; what other methods are there to get image height, width, size and other details in classic asp?

<%
Set imgCom = Server.CreateObject("eKov.PicturePreviewer")
imagepath = server.MapPath("/images/" & folder)
fullpath = imagepath & "\" & pageimage
imgCom.LoadFromFile (fullpath)
iHeight = imgCom.Height
iWidth = imgCom.Width
set imgCom = nothing
%>

Even though the dll is registered, it does not seem to be compatible with Windows Server 2016. The fact that the dll was created more than 13 years ago I get. So I'm not looking for a solution to get the dll working, but rather a solution in code or another dll that will allow me to do the same thing.

Thanks

Shadow The GPT Wizard
  • 66,030
  • 26
  • 140
  • 208
MicNet
  • 11
  • 1
  • 3
  • If all you need is type, width, and height of the image, you can use this: https://stackoverflow.com/questions/15874740/pure-asp-upload-with-image-detection/15874741#15874741 – Shadow The GPT Wizard Nov 29 '17 at 07:10
  • ShadowWizard, thanks. I have tried to utilize the uploadhelper class but I'm not having any luck. This is my code: [code] – MicNet Nov 30 '17 at 15:36
  • @Shadow Wizard, thanks. I have tried to utilize the uploadhelper class but I'm not having any luck. I tried to paste my code but it says it's too long by 1596 characters. I don't know how to show my code for troubleshooting. – MicNet Nov 30 '17 at 15:51
  • I am afraid this "uploadhelper" was written by someone else, not me, so I can't help with that. My own answer there contains full code sample, you can try this and if getting into trouble edit the question here, describe what you have tried exactly, what error you get, and I can try to help. – Shadow The GPT Wizard Nov 30 '17 at 15:53
  • @Shadow Ah, I did not realize that. I'll try out your code instead. Thanks – MicNet Nov 30 '17 at 19:30

0 Answers0