JVCL Help:TJvID3BinaryFrame.SaveToStream
From Project JEDI Wiki
Jump to navigationJump to searchJVCL Help: TJvID3BinaryFrame.SaveToStream Method
[+] TJvID3BinaryFrame Methods
[+] TJvID3BinaryFrame Properties
Search in JVCL Help
Search in all projectsSummary
Writes the entire contents of the memory stream to the stream object specified by Stream.
Pascal
procedureSaveToStream(Stream: TStream); virtual;
Parameters
Parameters | Description |
Stream: TStream | Specifies the name of the stream to which the binary field’s value is saved. |
Description
Use SaveToStream to copy the contents of the binary field of the tag into another storage medium. SaveToStream writes the entire contents into the indicated stream object, starting at the current position in the stream that was passed as a parameter.
If the entire contents of the memory stream cannot be written to the target stream, SaveToStream raises an exception.
Example: var
MS: TMemoryStream;
Note that you can rewrite this example as
Frame: TJvID3BinaryFrame;
begin
Frame := TJvID3BinaryFrame.Find(JvID3v21, fiPicture);
if (Frame isTJvID3PictureFrame) and
SameText(TJvID3PictureFrame(Frame).MIMEType, 'image/bmp') then
begin
MS := TMemoryStream.Create;
try
Frame.SaveToStream(MS);
Image1.Picture.Bitmap.LoadFromStream(MS);
finally
MS.Free;
end;
end;
end;{ If Find results nil then the picture is cleared }
Image1.Picture.Assign(TJvID3BinaryFrame.Find(JvID3v21, fiPicture));
See Also
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