wes / phpimageresize

php image (local or remote) resizing and caching script
http://joedesigns.com
118 stars 79 forks source link

some code cleaning #8

Closed whizzzkid closed 5 years ago

whizzzkid commented 12 years ago

I relaized that there were some lines that were either were not performing anything or were redundant. like the defaults were set at the start, so we need not check if the variables are set or not when we are resizing 100s of images, this can cause a lag of many milliseconds as it is just checking if it is set or not set.

Also I changed the syntax to parenthesis oriented, makes it easier to understand and edit (folding of functions). also somewhere i removed a variable that was not needed.

There was also an issue regarding 'scale' => 'false' i think it's okay to make it 'scale' => false

Still Please test the working before pulling. here is the working example http://clients.nishantarora.in/projects/img_r_u/example.php