| @@ 404-417 (lines=14) @@ | ||
| 401 | /** |
|
| 402 | * @return mixed |
|
| 403 | */ |
|
| 404 | public function getWidth() |
|
| 405 | { |
|
| 406 | //$filename = $imgloc."/"; |
|
| 407 | $filename = $this->uploadDir . '/'; |
|
| 408 | $filename .= $this->savedFileName; |
|
| 409 | if (false !== $dimension = getimagesize($filename)) { |
|
| 410 | if ($dimension[0] > 0) { |
|
| 411 | $result = $dimension[0]; |
|
| 412 | } |
|
| 413 | } else { |
|
| 414 | trigger_error(sprintf('Failed fetching image size of %s, image width unknown..', $this->mediaTmpName), E_USER_WARNING); |
|
| 415 | } |
|
| 416 | ||
| 417 | return $result; |
|
| 418 | } |
|
| 419 | ||
| 420 | /** |
|
| @@ 423-436 (lines=14) @@ | ||
| 420 | /** |
|
| 421 | * @return mixed |
|
| 422 | */ |
|
| 423 | public function getHeight() |
|
| 424 | { |
|
| 425 | //$filename = $imgloc."/"; |
|
| 426 | $filename = $this->uploadDir . '/'; |
|
| 427 | $filename .= $this->savedFileName; |
|
| 428 | if (false !== $dimension = getimagesize($filename)) { |
|
| 429 | if ($dimension[1] > 0) { |
|
| 430 | $result = $dimension[1]; |
|
| 431 | } |
|
| 432 | } else { |
|
| 433 | trigger_error(sprintf('Failed fetching image size of %s, image height unknown..', $this->mediaTmpName), E_USER_WARNING); |
|
| 434 | } |
|
| 435 | ||
| 436 | return $result; |
|
| 437 | } |
|
| 438 | ||
| 439 | /** |
|