So I ended up slicing all my functions up and debug why the quality loss is happening in all pictures I am uploading. Now I have 2 lines of code, which is simple to understand and where the issue is.
See the quality loss:
http://gyazo.com/2ba4f42960a9b96b83f5eca4aadcf7e7
The right side is the original picture, and left picture is after this script:
$image = imagecreatefromjpeg('original.jpg');
imagejpeg($image, "newoutput.jpg", 100);
my newoutput.jpg decrease, and gets "matt" / gets darker for some reason?
I have found that it could be the quality param in imagejpeg, but it is already 100.
How can I please solve this?