SCDownloadMediaOptions Class Reference
| Inherits from | SCParams : NSObject |
| Declared in | SCDownloadMediaOptions.h |
Overview
SCDownloadMediaOptions class contains properties to configure image download.
The options are the same as those for “Dynamic Media Parameters” and “sc:image” XSLT tag.
Tasks
-
widthWidth (in pixels)
property
For example : “w=1024” -
heightHeight (in pixels)
property
For example : “h=768” -
maxWidthMaxWidth (pixels)
property
For example : “mw=1920” -
maxHeightMaxHeight (pixels)
property
For example : “mh=1080” -
languageFor example : “la=en”
property -
versionFor example : “vs=latest”
property -
databaseSitecore database where media file is stored.
property -
backgroundColorIt accepts both human friendly color names
property
For example : “bc=cyan"
mediaOptions.database = @"cyan”; -
disableMediaCacheTells the instance to not use the server side cache.
property
Client side cache should be configured using SCApiSession or SCExtendedApiSession class. -
allowStrechIf set to YES, the image will be resized. Otherwise it will be centered. Other space will be filled with the background color.
property
See [SCDownloadMediaOptions backgroundColor] for details. -
scaleScale factor for image resizing.
property
Set “1” for actual size.
Set “0.25” to reduce the image size to 25% of the original one.
You can also enlarge the image by setting positive values larger than “1” -
displayAsThumbnailReduces the image to the thumbnail size if set to YES.
property
Properties
allowStrech
If set to YES, the image will be resized. Otherwise it will be centered. Other space will be filled with the background color.
See [SCDownloadMediaOptions backgroundColor] for details.
@property (nonatomic) BOOL allowStrechDiscussion
If set to YES, the image will be resized. Otherwise it will be centered. Other space will be filled with the background color.
See [SCDownloadMediaOptions backgroundColor] for details.
“as=1” - stretching enabled
“as=0” - stretching disabled
Default value is “NO”
Declared In
SCDownloadMediaOptions.hbackgroundColor
It accepts both human friendly color names
For example : “bc=cyan"
mediaOptions.database = @"cyan”;
@property (nonatomic) NSString *backgroundColorDiscussion
It accepts both human friendly color names
For example : “bc=cyan"
mediaOptions.database = @"cyan”;
It also accepts HTML colors
Hex values are written as 3 double digit numbers, starting with a # sign.
For example : #00FFFF, “bc=%2300FFFF”
mediaOptions.database = @“%2300FFFF”; // cyan
Declared In
SCDownloadMediaOptions.hdatabase
Sitecore database where media file is stored.
@property (nonatomic) NSString *databaseDiscussion
Sitecore database where media file is stored.
For example : “db=master”
mediaOptions.database = @“master”;
Declared In
SCDownloadMediaOptions.hdisableMediaCache
Tells the instance to not use the server side cache.
Client side cache should be configured using SCApiSession or SCExtendedApiSession class.
@property (nonatomic) BOOL disableMediaCacheDiscussion
Tells the instance to not use the server side cache.
Client side cache should be configured using SCApiSession or SCExtendedApiSession class.
“dmc=1” - server cache disbled
“dmc=0” - server cache enabled
Default value is “NO”
Declared In
SCDownloadMediaOptions.hdisplayAsThumbnail
Reduces the image to the thumbnail size if set to YES.
@property (nonatomic) BOOL displayAsThumbnailDiscussion
Reduces the image to the thumbnail size if set to YES.
“as=1” - display as a thumbnail
“as=0” - display in a full size
Declared In
SCDownloadMediaOptions.hheight
Height (in pixels)
For example : “h=768”
@property (nonatomic) float heightDiscussion
Height (in pixels)
For example : “h=768”
mediaOptions.height = 768;
Declared In
SCDownloadMediaOptions.hlanguage
For example : “la=en”
@property (nonatomic) NSString *languageDiscussion
For example : “la=en”
mediaOptions.language = @“en”
Declared In
SCDownloadMediaOptions.hmaxHeight
MaxHeight (pixels)
For example : “mh=1080”
@property (nonatomic) float maxHeightDiscussion
MaxHeight (pixels)
For example : “mh=1080”
mediaOptions.maxHeight = 1080;
Declared In
SCDownloadMediaOptions.hmaxWidth
MaxWidth (pixels)
For example : “mw=1920”
@property (nonatomic) float maxWidthDiscussion
MaxWidth (pixels)
For example : “mw=1920”
mediaOptions.maxWidth = 1920;
Declared In
SCDownloadMediaOptions.hscale
Scale factor for image resizing.
Set “1” for actual size.
Set “0.25” to reduce the image size to 25% of the original one.
You can also enlarge the image by setting positive values larger than “1”
@property (nonatomic) float scaleDiscussion
Scale factor for image resizing.
Set “1” for actual size.
Set “0.25” to reduce the image size to 25% of the original one.
You can also enlarge the image by setting positive values larger than “1”
Negative values lead to undefined behaviour.
Declared In
SCDownloadMediaOptions.h