Resizing Images - VBA

Hi all,
I offer a function for Staff to upload a ‘Selfie’ picture via their Smart Phones on my app.
The problem is that the size is normally too big to display nice and fast in a Browser later on.
I don’t want to limit the size since that will mean the Staff will have to go and change the Phone’s camera settings etc. It is difftent when they select a pic file
So I was looking at a way to resize images once they uploaded them (on the fly)

To my wonder I found this excellent code (but it is in VBA) it helps me a great deal as the above apps also interfaces with an Access database. But it does not help me on the website side.

Is there a way to change the VBA to JavaScript or PHP or whatever (sorry I’m not a Web Developer yet :))

The original code is here:
https://www.devhut.net/2017/01/18/vba-resize-image

Thanks

There’s a lot of image manipulation functions out there, you can start here: https://www.php.net/manual/en/function.imagecopyresized.php

also you can have a look for libraries on github.

Ahh thanks a lot. Like I said - I’m new to this side of dev.
Regards

Sponsor our Newsletter | Privacy Policy | Terms of Service