JVCL Help:TJvID3BinaryFrame.LoadFromStream

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

Search in JVCL Help

 
Search in all projects
 

Summary

Loads the entire contents of a stream into the binary field of the frame.


Pascal

 procedureLoadFromStream(Stream: TStream); virtual;


Parameters

Parameters Description
Stream: TStream Specifies the stream from which the binary field’s value of the tag is copied.


Description

Use LoadFromStream to copy the contents of a stream into the binary field of the frame. LoadFromStream always sets the Position of the source stream to 0, before streaming in the number of bytes indicated by the source stream’s Size property.
LoadFromStream reallocates the internal buffer of the binary field so that the contents of the stream will exactly fit. It sets the DataSize property accordingly, and then rea the entire contents of the stream into the binary field. Thus, LoadFromStream will discard any pre-existing data stored in the binary field of the tag.
Example: var

 MS: TMemoryStream;
begin
JvID3v21.Open;
MS := TMemoryStream.Create;
try
Image1.Picture.Bitmap.SaveToStream(MS);
TJvID3PictureFrame.FindOrCreate(JvID3v21, ptArtist).LoadFromStream(MS);
finally
MS.Free;
end;
JvID3v21.Commit;
end;


See Also

TJvID3BinaryFrame.DataSize, TJvID3BinaryFrame.LoadFromFile


About

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