note 91116 added to id3v2attachedpictureframe.setPicture
| From: | maceo dot park at gmail dot com | Date: | Tue, 26 May 2009 03:36:59 +0000 |
| Subject: | note 91116 added to id3v2attachedpictureframe.setPicture | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-156012@lists.php.net to get a copy of this message | ||
<?php
$path = realpath('.');
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path),
RecursiveIteratorIterator::SELF_FIRST);
foreach($objects as $name => $object){
if(strpos($name, ".mp3") !== false) {
$mp3 = new KTaglib_MPEG_File($name);
$frameList = $mp3->getID3v2Tag()->getFrameList();
echo $name . "\n";
print_r($frameList);
$pic_frame = new KTaglib_ID3v2_AttachedPictureFrame();
$pic_frame->setMimeType("image/jpeg");
$pic_frame->setType(3); // front_cover. refer to taglib source code.
/taglib-1.5/taglib/mpeg/id3v2/frames/attachedpictureframe.h
$pic_frame->setPicture("SamplePicture.jpg");
$mp3->getID3v2Tag()->addFrame($pic_frame);
$mp3->save();
}
}
?>
----
Server IP: 211.43.210.124
Probable Submitter: 211.189.163.250
----
Manual Page -- http://www.php.net/manual/en/id3v2attachedpictureframe.setPicture.php
Edit -- https://master.php.net/note/edit/91116
Del: integrated -- https://master.php.net/note/delete/91116/integrated
Del: useless -- https://master.php.net/note/delete/91116/useless
Del: bad code -- https://master.php.net/note/delete/91116/bad+code
Del: spam -- https://master.php.net/note/delete/91116/spam
Del: non-english -- https://master.php.net/note/delete/91116/non-english
Del: in docs -- https://master.php.net/note/delete/91116/in+docs
Del: other reasons-- https://master.php.net/note/delete/91116
Reject -- https://master.php.net/note/reject/91116
Search -- https://master.php.net/manage/user-notes.php