in reply to Re: Dealing with rectangular images
in thread Dealing with rectangular images
So I divide the width by the height and if it's greater than 1.5 it should display the gray color. Some pics that the calculation equals 1.77 do not trigger the gray though. I might be doing it wrong.if ($picwidth / $picheight > 1.5) { $backcolor="#f5f5f5"; } else { $backcolor="#ffffff"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Dealing with rectangular images
by pryrt (Abbot) on May 25, 2016 at 20:57 UTC | |
|
Re^3: Dealing with rectangular images
by RonW (Parson) on May 26, 2016 at 00:48 UTC |