Resize image in PHP using System.Drawing

Integrating PHP and C# together. Using .NET libraries from PHP and vice versa.

Resize image in PHP using System.Drawing

Postby Jakub Misek » 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".
You do not have the required permissions to view the files attached to this post.
Jakub Misek │ DEVSENSE s.r.o. | @misekjakubjakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2092
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Return to PHP/C# interoperability

Who is online

Users browsing this forum: No registered users and 1 guest

cron

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 89 on October 15th, 2018, 4:06 pm

Users browsing this forum: No registered users and 1 guest