Interface IImageLoader
Namespace: Aurigma.DesignAtoms.Canvas
Assembly: Aurigma.DesignAtoms.dll
Syntax
public interface IImageLoader
Methods
CreateImageSource
ImageItem.ImageSource CreateImageSource(Bitmap bitmap, FileFormat fileFormat)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.Bitmap | bitmap | |
| Aurigma.DesignAtoms.Model.Configuration.FileFormat | fileFormat |
Returns
Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSource
CreateImageSource
ImageItem.ImageSource CreateImageSource(Stream inputStream, int pageIndex = 0)
Parameters
| Type | Name | Description |
|---|---|---|
System.IO.Stream | inputStream | |
System.Int32 | pageIndex |
Returns
Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSource
LoadImage
string LoadImage(PipelineElement reader, FileFormat fileFormat = FileFormat.Tiff, bool actualSize = false, bool preserveAspectRatio = false)
Parameters
| Type | Name | Description |
|---|---|---|
Aurigma.GraphicsMill.PipelineElement | reader | |
| Aurigma.DesignAtoms.Model.Configuration.FileFormat | fileFormat | |
System.Boolean | actualSize | |
System.Boolean | preserveAspectRatio |
Returns
System.String
LoadImage
string LoadImage(FileInfo sourceImage, bool allowImageFileDelete = false, string storageId = null)
Parameters
| Type | Name | Description |
|---|---|---|
System.IO.FileInfo | sourceImage | |
System.Boolean | allowImageFileDelete | |
System.String | storageId |
Returns
System.String
LoadImage
void LoadImage(ImageItem imageItem, PipelineElement reader, FileFormat fileFormat, bool actualSize = false, bool preserveAspectRatio = false, int pageIndex = 0, bool takeIntoAccountImageDpi = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem | imageItem | |
Aurigma.GraphicsMill.PipelineElement | reader | |
| Aurigma.DesignAtoms.Model.Configuration.FileFormat | fileFormat | |
System.Boolean | actualSize | |
System.Boolean | preserveAspectRatio | |
System.Int32 | pageIndex | |
System.Boolean | takeIntoAccountImageDpi |
LoadImage
void LoadImage(ImageItem imageItem, FileInfo imageFile, bool actualSize, int pageIndex = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem | imageItem | |
System.IO.FileInfo | imageFile | |
System.Boolean | actualSize | |
System.Int32 | pageIndex |
LoadImage
void LoadImage(ImageItem imageItem, FileInfo sourceImage, bool actualSize, bool preserveAspectRatio, bool allowImageFileDelete = false, int pageIndex = 0, bool takeIntoAccountImageDpi = false)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem | imageItem | |
System.IO.FileInfo | sourceImage | |
System.Boolean | actualSize | |
System.Boolean | preserveAspectRatio | |
System.Boolean | allowImageFileDelete | |
System.Int32 | pageIndex | |
System.Boolean | takeIntoAccountImageDpi |
LoadImage
void LoadImage(ImageItem item, Stream imageStream, bool actualSize, bool preserveAspectRatio, bool takeIntoAccountImageDpi, int pageIndex = 0, string storageId = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem | item | |
System.IO.Stream | imageStream | |
System.Boolean | actualSize | |
System.Boolean | preserveAspectRatio | |
System.Boolean | takeIntoAccountImageDpi | |
System.Int32 | pageIndex | |
System.String | storageId |
LoadImage
string LoadImage(ImageItem.ImageSource source)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSource | source |
Returns
System.String
Update
Task Update(ImageItem item, bool needToDownloadImage, bool actualSize, bool preserveAspectRatio, bool takeIntoAccountImageDpi, string sourceUrl = null, float xDpi = 72F, float yDpi = 72F)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem | item | |
System.Boolean | needToDownloadImage | |
System.Boolean | actualSize | |
System.Boolean | preserveAspectRatio | |
System.Boolean | takeIntoAccountImageDpi | |
System.String | sourceUrl | |
System.Single | xDpi | |
System.Single | yDpi |
Returns
System.Threading.Tasks.Task
SetItemImage
void SetItemImage(ImageItem item, string storageFileId, int pageIndex, bool actualSize, bool preserveAspectRatio, bool takeIntoAccountImageDpi, float xDpi = 72F, float yDpi = 72F)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem | item | |
System.String | storageFileId | |
System.Int32 | pageIndex | |
System.Boolean | actualSize | |
System.Boolean | preserveAspectRatio | |
System.Boolean | takeIntoAccountImageDpi | |
System.Single | xDpi | |
System.Single | yDpi |
DownloadImageSource
string DownloadImageSource(ImageItem.ImageSource imageSource)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSource | imageSource |
Returns
System.String
SetImageItemHeight
void SetImageItemHeight(ImageItem item, float height, bool calculateWidth = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem | item | |
System.Single | height | |
System.Boolean | calculateWidth |
SetImageItemWidth
void SetImageItemWidth(ImageItem item, float width, bool calculateHeight = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem | item | |
System.Single | width | |
System.Boolean | calculateHeight |
GetExtendedImageSource
ImageLoader.ExtendedImageSource GetExtendedImageSource(ImageItem.ImageSource imageSource)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSource | imageSource |
Returns
Aurigma.DesignAtoms.Canvas.ImageLoader.ExtendedImageSource
GetExtendedImageSourceAsync
Task<ImageLoader.ExtendedImageSource> GetExtendedImageSourceAsync(ImageItem.ImageSource imageSource)
Parameters
| Type | Name | Description |
|---|---|---|
| Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSource | imageSource |
Returns
System.Threading.Tasks.Task<Aurigma.DesignAtoms.Canvas.ImageLoader.ExtendedImageSource>