Page 1 of 1
The Beloved Motivator Script is back
Posted: Tue Jun 16, 2020 2:04 pm
by theENIGMATRON
Re: The Beloved Motivator Script is back
Posted: Tue Jun 16, 2020 3:03 pm
by DJ-Daz
It no likey PNG files. Probably doesn't know what to do with the transparent layer

Re: The Beloved Motivator Script is back
Posted: Tue Jun 16, 2020 3:11 pm
by theENIGMATRON
Dazbobaby wrote: Tue Jun 16, 2020 3:03 pm
It no likey PNG files. Probably doesn't know what to do with the transparent layer
Code is there for png.......
What format was the extention, it will only accept lowercase.
Code: Select all
//Save the resized image
if($extension == "jpg" || $extension == "jpeg" || $extension == "JPG"){
imagejpeg($uploadedimage, $filepath, 100);
}elseif($extension == "png") {
imagepng($uploadedimage, $filepath);
}elseif($extension == "gif") {
imagegif($uploadedimage, $filepath);
}
Am not sure why i did it like that, as i should just store the name to lowercase.
or use an expression to ensure i account for all.
Something like:
Code: Select all
if($extension == '[jJ][pP][gG]' || $extension == '[jJ][pP][eE][gG]' ){
imagejpeg($uploadedimage, $filepath, 100);
}
Re: The Beloved Motivator Script is back
Posted: Tue Jun 16, 2020 3:23 pm
by DJ-Daz
That worked

Re: The Beloved Motivator Script is back
Posted: Tue Jun 16, 2020 3:26 pm
by theENIGMATRON
Ill update it for both lower and upper using an expression, as techinally a Jpeg will not work nor will a jPeg or a jpG
Its amazing when you look back at code you typed many moons ago and wonder WTF you did it that way
Should work fine now for any type of uppercase lowercase combo
Re: The Beloved Motivator Script is back
Posted: Fri Oct 08, 2021 9:11 am
by DJ-Daz
Re: The Beloved Motivator Script is back
Posted: Fri Oct 08, 2021 7:13 pm
by DJ-Daz
Re: The Beloved Motivator Script is back
Posted: Mon Oct 11, 2021 1:18 pm
by theENIGMATRON