ImageAsset Data Object - Campaign Management
Applies crop settings to stored image media for a specific aspect ratio.
Note
Not everyone has this feature yet. If you don't, don't worry. It's coming soon.
If you do not specify crop settings, the service will automatically crop up to the maximum possible area from the center of the image. For example, given a 1000x1000 pixel image, for the 1.91:1 aspect ratio, the auto crop setting will be CropWidth=1000, CropHeight=524, CropX=0, and CropY=238.
Syntax
<xs:complexType name="ImageAsset" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexContent mixed="false">
<xs:extension base="tns:Asset">
<xs:sequence>
<xs:element minOccurs="0" name="CropHeight" nillable="true" type="xs:int" />
<xs:element minOccurs="0" name="CropWidth" nillable="true" type="xs:int" />
<xs:element minOccurs="0" name="CropX" nillable="true" type="xs:int" />
<xs:element minOccurs="0" name="CropY" nillable="true" type="xs:int" />
<xs:element minOccurs="0" name="SubType" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="TargetHeight" nillable="true" type="xs:int">
<xs:annotation>
<xs:appinfo>
<DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element minOccurs="0" name="TargetWidth" nillable="true" type="xs:int">
<xs:annotation>
<xs:appinfo>
<DefaultValue EmitDefaultValue="false" xmlns="http://schemas.microsoft.com/2003/10/Serialization/" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
Elements
The ImageAsset object has the following elements: CropHeight, CropWidth, CropX, CropY, SubType, TargetHeight, TargetWidth.
Element | Description | Data Type |
---|---|---|
CropHeight | The number of pixels to use from the image asset source, starting from the CropY position and moving upwards. Add: Optional. If you do not set this element, the service will automatically crop according to the aspect ratio of the SubType. Update: Optional. If no value is set for the update, this setting is not changed. |
int |
CropWidth | The number of pixels to use from the image asset source, starting from the CropX position and moving to the right. Add: Optional. If you do not set this element, the service will automatically crop according to the aspect ratio of the SubType. Update: Optional. If no value is set for the update, this setting is not changed. |
int |
CropX | Starting from the lower left corner of image asset source, this is the number of pixels to skip to the right on the x-axis before applying the CropWidth. Add: Optional. If you do not set this element, the service will automatically crop according to the aspect ratio of the SubType. Update: Optional. If no value is set for the update, this setting is not changed. |
int |
CropY | Starting from the lower left corner of image asset source, this is the number of pixels to skip upwards on the y-axis before applying the CropHeight. Add: Optional. If you do not set this element, the service will automatically crop according to the aspect ratio of the SubType. Update: Optional. If no value is set for the update, this setting is not changed. |
int |
SubType | Represents the aspect ratio for this image asset. The aspect ratio for the sub type must match the effective image asset dimensions. If CropHeight and CropWidth are not used then the aspect ratio for the sub type must match the aspect ratio of the stored image media. If CropHeight and CropWidth are used then the true aspect ratio of the media that is stored in the account level media library can differ, so long as CropHeight and CropWidth result in the correct aspect ratio. In either case the true aspect ratio of the media that is stored in the account level media library will remain unchanged. The sub type must be set to "Logo" if the image is associated with an ad as a "LandscapeLogoMedia" or "SquareLogoMedia". The possible sub type values include OriginalImage, LandscapeLogoMedia, SquareLogoMedia, LandscapeImageMedia, SquareImageMedia, ImageMedia169X100, ImageMedia201X100, ImageMedia120X100, ImageMedia200X100, ImageMedia124X100, ImageMedia153X100. For more details see ResponsiveAd Remarks. Note: As of now, the SubType OriginalImage replaces the role of LandscapeImageMedia as the default image for ResponsiveAd of Audience Campaign. New sub types might be added in the future, so you should not take any dependency on a fixed set of values. Add: Required Update: Read-only. You cannot update the sub type during update. |
string |
TargetHeight | The target height dimension of an image asset. | int |
TargetWidth | The target width dimension of an image asset. | int |
The ImageAsset object has Inherited Elements.
Inherited Elements
Inherited Elements from Asset
The ImageAsset object derives from the Asset object, and inherits the following elements: Id, Name, Type. The descriptions below are specific to ImageAsset, and might not apply to other objects that inherit the same elements from the Asset object.
Element | Description | Data Type |
---|---|---|
Id | The unique Microsoft Advertising identifier for the asset in a Microsoft Advertising account. The same image asset identifier can be used multiple times in the same ad for different aspect ratios, and can also be used by multiple ads in the same Microsoft Advertising account. The identifier of image asset with SubType set to LandscapeImageMedia is used for all auto-generated image asset sub types within the same ad. Whether or not you let Microsoft Advertising automatically generate the cropped images, the Id does not need to be unique among the image assets linked to the same ad. You can create media for responsive ads via the AddMedia service operation. Then you can use the returned media identifier as the image asset ID. The aspect ratio of the image that you added must be supported for the image asset SubType. Add: Required Update: Optional. If no value is set for the update, this setting is not changed. |
long |
Name | Reserved for future use. Add: Optional Update: Optional. If no value is set for the update, this setting is not changed. |
string |
Type | The type of the asset. This value is ImageAsset when you retrieve an image asset. For more information about asset types, see the Asset Data Object Remarks. Add: Read-only Update: Read-only |
string |
Requirements
Service: CampaignManagementService.svc v13
Namespace: https://bingads.microsoft.com/CampaignManagement/v13