summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-01-23 06:16:55 +0100
committerEvan Prodromou <evan@controlyourself.ca>2009-01-23 06:16:55 +0100
commit9dc5d8d0f6db1249a62162877c81d240fcf32a0a (patch)
tree6d71e25790e134935a1fea922135825881a62faa /lib
parenta7b80ef2304c281d65ef7d0fda395ef904cd4d55 (diff)
Made avatar upload a two-stage process; first upload, then crop
Diffstat (limited to 'lib')
-rw-r--r--lib/imagefile.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/imagefile.php b/lib/imagefile.php
index f15a72c76..7f1db892c 100644
--- a/lib/imagefile.php
+++ b/lib/imagefile.php
@@ -48,12 +48,17 @@ if (!defined('LACONICA')) {
class ImageFile
{
var $filename = null;
+ var $barename = null;
var $type = null;
+ var $height = null;
+ var $width = null;
- function __construct($filename=null, $type=null)
+ function __construct($filename=null, $type=null, $width=null, $height=null)
{
$this->filename = $filename;
$this->type = $type;
+ $this->width = $type;
+ $this->height = $type;
}
static function fromUpload($param='upload')
@@ -83,6 +88,9 @@ class ImageFile
return;
}
+ $imagefile->width = $info[0];
+ $imagefile->height = $info[1];
+
switch ($info[2]) {
case IMAGETYPE_GIF:
case IMAGETYPE_JPEG: