summaryrefslogtreecommitdiffstats
path: root/lib/class
diff options
context:
space:
mode:
Diffstat (limited to 'lib/class')
-rw-r--r--lib/class/core.class.php23
-rw-r--r--lib/class/vainfo.class.php2
2 files changed, 25 insertions, 0 deletions
diff --git a/lib/class/core.class.php b/lib/class/core.class.php
index 4818e39b..c1d07e86 100644
--- a/lib/class/core.class.php
+++ b/lib/class/core.class.php
@@ -87,5 +87,28 @@ class Core {
} // form_verify
+ /**
+ * image_dimensions
+ * This returns the dimensions of the passed song of the passed type
+ * returns an empty array if PHP-GD is not currently installed, returns
+ * false on error
+ */
+ public static function image_dimensions($image_data) {
+
+ if (!function_exists('ImageCreateFromString')) { return false; }
+
+ $image = ImageCreateFromString($image_data);
+
+ if (!$image) { return false; }
+
+ $width = imagesx($image);
+ $height = imagesy($image);
+
+ if (!$width || !$height) { return false; }
+
+ return array('width'=>$width,'heigh'=>$height);
+
+ } // image_dimensions
+
} // Core
?>
diff --git a/lib/class/vainfo.class.php b/lib/class/vainfo.class.php
index 5ecfda43..ee2ce147 100644
--- a/lib/class/vainfo.class.php
+++ b/lib/class/vainfo.class.php
@@ -494,6 +494,8 @@ class vainfo {
*/
private function _clean_tag($tag,$encoding='') {
+ return $tag;
+
// If we've got iconv then go ahead and clear her up
if ($this->_iconv) {
/* Guess that it's UTF-8 */