I scratch my head on this, since I hardly know how to begin to understand the problem in my hands.
The problem is using a static method (and which I took from some post here in SO) that saves the System.Drawing.Image file to a jpeg file on disk and looks something like this:
public static void SaveJpeg(string path, Image image, int quality) {
On my website, users send photos that are first reduced to about 900x900 (from GDI itself, to reduce the file size, which can be up to 4 MB), and then saved to disk. The problem is that running it with the same parameter of the System.Drawing.Image parameter on my machine and in my Linode node gives:
1. On my machine, a 3.1 MB high-resolution image is converted to an ~ 80 kB image.
2. In my Linode, the same image will produce an image of ~ 500 kb.
First of all, I would like to emphasize that I run the same web application on my testing / development computer, which I run in my Linode. In addition, I checked the versions of all the software installed on both machines (gentoo linux, by the way), and I got:
1. Mono: 2.10.5, the same USE flags on both machines,
2. Apache 2.2.21-r1, some USE flags are slightly different (but should not interfere); 3. Mod_mono 2.10, the same USE flags on both machines,
4. libgdiplus 2.10, the first USE flags, and then tried to turn on Cairo on machines without changing the results.
5. cairo 1.10.2-r1, the opengl flag is enabled on my machine, but not in Linode.
I can't think of why SO behavior is different. The big difference is that my Linode is 32-bit Linux 3.0.4, while my machine is 64-bit Linux 2.6.39, although I think this should not interfere either.
Any similar experiences or ideas, anyone?