iTunes COM Interface: IITArtwork Interface Reference

iTunes COM

IITArtwork Interface Reference

List of all members.

Detailed Description

Defines a single piece of artwork.

Artwork is always associated with an individual track.

To add a piece of artwork to a track, use IITTrack::AddArtworkFromFile(). The IITTrack::Artwork property returns the collection of artwork for the track.

Public Member Functions

Methods
HRESULT Delete ()
 Delete this piece of artwork from the track.
HRESULT SetArtworkFromFile ([in] BSTR filePath)
 Replace existing artwork data with new artwork from an image file.
HRESULT SaveArtworkToFile ([in] BSTR filePath)
 Save artwork data to an image file.
Properties
HRESULT Format ([out, retval] ITArtworkFormat *format)
 Returns the format of the artwork.
HRESULT IsDownloadedArtwork ([out, retval] VARIANT_BOOL *isDownloadedArtwork)
 Returns true if the artwork was downloaded by iTunes.
HRESULT Description ([out, retval] BSTR *description)
 Returns the description for the artwork. Artwork descriptions are only supported in files that use ID3 tags (i.e. MP3 files).
HRESULT Description ([in] BSTR description)
 Sets the description for the artwork. Artwork descriptions are only supported in files that use ID3 tags (i.e. MP3 files).

Member Function Documentation

HRESULT IITArtwork::Delete  ) 
 

Delete this piece of artwork from the track.

Return values:
S_OK The operation was successful.
ITUNES_E_OBJECTDELETED This artwork or the track containing this artwork has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITArtwork::Description [in] BSTR  description  ) 
 

Sets the description for the artwork. Artwork descriptions are only supported in files that use ID3 tags (i.e. MP3 files).

Note:
This property is available in iTunes 7.7 and later (iTunes type library 1.11 and later).
Parameters:
description The new description for the artwork.
Return values:
S_OK The operation was successful.
E_POINTER description is NULL.
ITUNES_E_OBJECTLOCKED This track is not modifiable.
ITUNES_E_OBJECTDELETED This artwork or the track containing this artwork has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITArtwork::Description [out, retval] BSTR *  description  ) 
 

Returns the description for the artwork. Artwork descriptions are only supported in files that use ID3 tags (i.e. MP3 files).

Note:
This property is available in iTunes 7.7 and later (iTunes type library 1.11 and later).
Parameters:
description Returns the description for the artwork.
Return values:
S_OK The operation was successful.
E_POINTER description is NULL.
ITUNES_E_OBJECTDELETED This artwork or the track containing this artwork has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITArtwork::Format [out, retval] ITArtworkFormat format  ) 
 

Returns the format of the artwork.

Parameters:
format Returns the format of the artwork.
Return values:
S_OK The operation was successful.
E_POINTER format is NULL.
ITUNES_E_OBJECTDELETED This artwork or the track containing this artwork has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITArtwork::IsDownloadedArtwork [out, retval] VARIANT_BOOL *  isDownloadedArtwork  ) 
 

Returns true if the artwork was downloaded by iTunes.

Note:
This property is available in iTunes 7.0 and later (iTunes type library 1.8 and later).
Parameters:
isDownloadedArtwork Returns true if the artwork was downloaded by iTunes.
Return values:
S_OK The operation was successful.
E_POINTER isDownloadedArtwork is NULL.
ITUNES_E_OBJECTDELETED This artwork or the track containing this artwork has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITArtwork::SaveArtworkToFile [in] BSTR  filePath  ) 
 

Save artwork data to an image file.

The format of the saved data is specified by the artwork's format (JPEG, PNG, or BMP). The directory that contains the file must already exist, it will not be created. If the file already exists, its contents will be replaced.

Parameters:
filePath Full path to the artwork image file.
Return values:
S_OK The operation was successful.
E_POINTER filePath is NULL.
E_INVALIDARG filePath is not a valid path.
ITUNES_E_OBJECTDELETED This artwork or the track containing this artwork has been deleted.
E_FAIL An unexpected error occurred.

HRESULT IITArtwork::SetArtworkFromFile [in] BSTR  filePath  ) 
 

Replace existing artwork data with new artwork from an image file.

Parameters:
filePath Full path to the artwork image file. The image format must be supported by QuickTime (e.g. JPEG, GIF, PNG, BMP, etc.)
Return values:
S_OK The operation was successful.
E_POINTER filePath is NULL.
E_INVALIDARG filePath is not a valid path.
ITUNES_E_OBJECTDELETED This artwork or the track containing this artwork has been deleted.
E_FAIL An unexpected error occurred.


Generated on Fri Mar 13 12:50:54 2009 for iTunes 8.1.0.52
©2004-2007 Apple Computer, Inc.