2017-01-11, 07:04 PM
(This post was last modified: 2017-01-11, 07:32 PM by The Switch Club.
Edit Reason: bottom line
)
I have so far been unable to get a plugin created for doing this, so have decided to just edit the core files.
What I want to do is to make it so that if someone uploads a JPEG avatar that needs resizing, instead of keeping its original format, producing JPEG artefacts, I'd like it to be stored as a good ol' PNG.
I've narrowed it down to inc/functions_image.php, and it would appear that making the following modification would work, but it doesn't:
Performing this modification causes any JPEG larger than my forum's maximum avatar resolution to return "The file upload failed. Please choose a valid file and try again."
Can someone perhaps take a closer look and figure out what's going wrong? I understand doing this will probably cause a file extension mismatch, but that can be fixed another day.
Edit: Moved from 1.8 Support to Plugin Development by the look of things. I mean, I'm not making a plugin, but sure.
What I want to do is to make it so that if someone uploads a JPEG avatar that needs resizing, instead of keeping its original format, producing JPEG artefacts, I'd like it to be stored as a good ol' PNG.
I've narrowed it down to inc/functions_image.php, and it would appear that making the following modification would work, but it doesn't:
case 2:
@imagejpeg($thumbim, $path."/".$filename);
break;
case 2:
@imagepng($thumbim, $path."/".$filename);
break;
Performing this modification causes any JPEG larger than my forum's maximum avatar resolution to return "The file upload failed. Please choose a valid file and try again."
Can someone perhaps take a closer look and figure out what's going wrong? I understand doing this will probably cause a file extension mismatch, but that can be fixed another day.
Edit: Moved from 1.8 Support to Plugin Development by the look of things. I mean, I'm not making a plugin, but sure.