ISDBImage::ImageData

From MediaMonkey Wiki
Jump to: navigation, search

CoClass SDBImage, Interface ISDBImage

Property Get ImageData As Long


Property description

Pointer to binary image data.

Example code

Dim FS : Set FS = SDB.Tools.FileSystem 
 
Dim CoverFile : Set CoverFile = FS.CreateTextFile("C:\SomeFileName.jpg", True) 
CoverFile.WriteData CoverImage.ImageData, CoverImage.ImageDataLen 
CoverFile.Close
 
' CoverImage represents an SDBImage object
SDBApplication SDB = new SDBApplication();
string FilePath = @"C:\SomeFileName.jpg";
SDBAlbumArtList AlbumArt = SongData.AlbumArt;
if (AlbumArt != null && AlbumArt.Count > 0) {
  SDBImage FirstImage = AlbumArt.Item[0].Image;
  SDBTextFile CoverFile = SDB.Tools.FileSystem.CreateTextFile(FilePath, true);
  CoverFile.WriteData(FirstImage.ImageData, FirstImage.ImageDataLen);
  CoverFile.Close();
}