Copyright © 2008-2019 MultiMedia Soft

TagsEditor.ID3V2_CommercialFrameAddWithBitmap method

Previous pageReturn to chapter overviewNext page

Remarks

 

Adds a new commercial frame (COMR) to the ID3V2 tag.

The modification only happens in memory and not directly into the original sound file: in order to store modifications inside the file you need to call the TagsEditor.ID3V2_SaveChanges method.

 

For further details about methods related to tags editing refer to the TagsEditorMan class.

For details about the editing of tags see the How to edit tag info in sound files tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function ID3V2_CommercialFrameAddWithBitmap (

hPictureBitmap as IntPtr,

nFormat as enumGraphicFormats,

nFormatParameter as Int32,

strPrice as String,

strValidUntil as String,

strContactUrl as String,

nReceivedAs as enumId3v2ReceivedAsType,

strSeller as String,

strDescription as String

) as enumErrorCodes


 

[C#]

public string ID3V2_CommercialFrameAddWithBitmap (

IntPtr hPictureBitmap,

enumGraphicFormats nFormat,

Int32 nFormatParameter,

string strPrice,

string strValidUntil,

string strContactUrl,

enumId3v2ReceivedAsType nReceivedAs,

string strSeller,

string strDescription

);


 

[C++]

public: string ID3V2_CommercialFrameAddWithBitmap (

IntPtr hPictureBitmap,

enumGraphicFormats nFormat,

Int32 nFormatParameter,

string strPrice,

string strValidUntil,

string strContactUrl,

enumId3v2ReceivedAsType nReceivedAs,

string strSeller,

string strDescription

);


 

Parameter

Description

 

 

hPictureBitmap

Handle of the memory bitmap (HBITMAP) to add to the commercial frame. The resulting picture usually represents the seller's logo.

nFormat

Graphic format used to save the bitmap inside the commercial frame.

Supported values are the following:

Mnemonic value

Value

Meaning

GRAPHIC_FORMAT_BMP

0

BMP format

GRAPHIC_FORMAT_JPEG

1

JPEG format

GRAPHIC_FORMAT_PNG

2

PNG format

GRAPHIC_FORMAT_GIF

3

GIF format

GRAPHIC_FORMAT_TIFF

4

TIFF format

nFormatParameter

Eventual parameter required by the chosen graphic format.

When the nFormat parameter is set to GRAPHIC_FORMAT_JPEG, this parameter defines the JPEG compression factor whose range can be in the range from 0 (Maximum compression, Lower Quality) to 100 (Minimum compression, Higher Quality).

strPrice

String containing the price field.

strValidUntil

String containing the "Valid until" field.

strContactUrl

String containing the "Contact URL" field.

nReceivedAs

Value representing the "Received as" field.

Supported values are the following:

Mnemonic value

Value

Meaning

ID3V2_COMMERCIAL_RECAS_Other

0

Other

ID3V2_COMMERCIAL_RECAS_Standard_CD

1

Standard CD album with other songs

ID3V2_COMMERCIAL_RECAS_Compressed

2

Compressed audio on CD

ID3V2_COMMERCIAL_RECAS_File_Internet

3

File over the Internet

ID3V2_COMMERCIAL_RECAS_Stream_Internet

4

Stream over the Internet

ID3V2_COMMERCIAL_RECAS_Note_sheets

5

As note sheets

ID3V2_COMMERCIAL_RECAS_Note_sheets_book

6

As note sheets in a book with other sheets

ID3V2_COMMERCIAL_RECAS_Music

7

Music on other media

ID3V2_COMMERCIAL_RECAS_Merchandise

8

Non-musical merchandise

strSeller

String containing the "Seller" field.

strDescription

String containing the "Description" field.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.