JVCL Help:TJvID3PictureFrame

From Project JEDI Wiki
Jump to navigationJump to search
JEDI Visual Component Library Help

Search in JVCL Help

 
Search in all projects
 

Class Hierarchy

TJvID3Frame
TJvID3BinaryFrame
TJvID3PictureFrame
run\JvID3v2Base.pas


Summary

Represents a picture frame in a tag.

run\JvID3v2Base.pas


Pascal

 run\JvID3v2Base.pas
 TJvID3PictureFrame = class(TJvID3BinaryFrame);


Description

Use TJvID3PictureFrame to represent a picture frame in a tag. Such a frame has frame identifier fiPicture ("APIC").
This frame contains a picture directly related to the audio file.

  • MIMEType specifies the image format and subtype for the image. In the event that the MIME media type name is omitted, "image/" will be implied. The "image/png" or "image/jpeg" picture format should be used when interoperability is wanted.
  • Description is a short description of the picture, represented as a terminated textstring. The description has a maximum length of 64 characters, but may be empty.

There may be several pictures attached to one file, each in their individual TJvID3PictureFrame frame, but only one with the same content descriptor. There may only be one picture with PictureType ptOther or ptFileIcon respectively.
There is the possibility to put only a link to the image file by setting MIMEType to "--> " and set property URL to a complete URL. The use of linked files should however be used sparingly since there is the risk of separation of files.
The following example adds a frame with a picture selected by the user to the tag: with TOpenPictureDialog.Create(Application) do
try
ifnot Execute then

 Exit;


with TJvID3PictureFrame(JvID3v21.AddFrame(fiPicture)) do
begin

 PictureType := ptCoverFront;Description := 'Cover front';
MIMEType := ExtToMIMEType(ExtractFileExt(FileName));

{ Insert the picture in the frame }
LoadFromFile(FileName);
end;
finally
Free; end;

run\JvID3v2Base.pas


About

Navigation

run\JvID3v2Base.pas



Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page