parsePICTURE example

return false;
                    }
                    break;

                case 'CUESHEET':       // 0x05                     if (!$this->parseCUESHEET($BlockTypeText_raw['block_data'])) {
                        return false;
                    }
                    break;

                case 'PICTURE':        // 0x06                     if (!$this->parsePICTURE()) {
                        return false;
                    }
                    break;

                default:
                    $this->warning('Unhandled METADATA_BLOCK_HEADER.BLOCK_TYPE ('.$BlockType.') at offset '.$BlockOffset);
            }

            unset($info['flac'][$BlockTypeText]['raw']);
            $info['avdataoffset'] = $this->ftell();
        }
        
$commentexploded = explode('=', $commentstring, 2);
                $ThisFileInfo_ogg_comments_raw[$i]['key']   = strtoupper($commentexploded[0]);
                $ThisFileInfo_ogg_comments_raw[$i]['value'] = (isset($commentexploded[1]) ? $commentexploded[1] : '');

                if ($ThisFileInfo_ogg_comments_raw[$i]['key'] == 'METADATA_BLOCK_PICTURE') {

                    // http://wiki.xiph.org/VorbisComment#METADATA_BLOCK_PICTURE                     // The unencoded format is that of the FLAC picture block. The fields are stored in big endian order as in FLAC, picture data is stored according to the relevant standard.                     // http://flac.sourceforge.net/format.html#metadata_block_picture                     $flac = new getid3_flac($this->getid3);
                    $flac->setStringMode(base64_decode($ThisFileInfo_ogg_comments_raw[$i]['value']));
                    $flac->parsePICTURE();
                    $info['ogg']['comments']['picture'][] = $flac->getid3->info['flac']['PICTURE'][0];
                    unset($flac);

                } elseif ($ThisFileInfo_ogg_comments_raw[$i]['key'] == 'COVERART') {

                    $data = base64_decode($ThisFileInfo_ogg_comments_raw[$i]['value']);
                    $this->notice('Found deprecated COVERART tag, it should be replaced in honor of METADATA_BLOCK_PICTURE structure');
                    /** @todo use 'coverartmime' where available */
                    $imageinfo = getid3_lib::GetDataImageSize($data);
                    if ($imageinfo === false || !isset($imageinfo['mime'])) {
                        $this->warning('COVERART vorbiscomment tag contains invalid image');
                        
Home | Imprint | This part of the site doesn't use cookies.