Resize image in PHP using System.Drawing
Posted: January 25th, 2012, 6:25 pm
The sample resizes an image from file "original.jpg" to "resized.jpg". It uses System.Drawing.dll .NET assembly and Bitmap class.
Notice the configuration "app.config", where assemblies needed to be loaded into PHP context are specified within <classLibrary> section. In order to run the sample as a website, copy the configuration into your "web.config".
The sample can be compiled and debugged from Visual Studio when using Phalanger Tools, or from the command line by running attached "build.cmd".
Notice the configuration "app.config", where assemblies needed to be loaded into PHP context are specified within <classLibrary> section. In order to run the sample as a website, copy the configuration into your "web.config".
The sample can be compiled and debugged from Visual Studio when using Phalanger Tools, or from the command line by running attached "build.cmd".