public function decode($image = null) {
        try {
            
            if(is_array($image)) {
                $this->setArrayImages($image);

                if($this->_ARRAY_IMAGES == null) {
                    throw new \Exception("Nothing to decode");
                }

            } else {
                if(!file_exists($image)) {
                    throw new \Exception("File/Folder does not exist");
                }

                $this->setSingleImage($image);

                if($this->_SINGLE_IMAGE == null) {
                    throw new \Exception("Nothing to decode");
                }
            }

            $image = $this->prepare();

            if(empty($image)) {
                throw new \Exception("Is the java PATH set correctly ? Current Path set is : " . $this->getJavaPath());
            }

            // If the image is single then return the actual image
            if(count($image) == 1) {
                return current($image);
            }

            return $image;
        } catch(\Exception $e) {
            echo $e->getMessage();
        }
    }