Skip to main content

Class ImageLoader

Namespace: Aurigma.DesignAtoms.Canvas
Assembly: Aurigma.DesignAtoms.dll
Syntax
public class ImageLoader : IImageLoader

Inheritance: System.Object -> ImageLoader

Implements

Inherited Members

  • System.Object.ToString
  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object,System.Object)
  • System.Object.ReferenceEquals(System.Object,System.Object)
  • System.Object.GetHashCode
  • System.Object.GetType
  • System.Object.MemberwiseClone

Constructors

ImageLoader

public ImageLoader(IConfiguration configuration, IStateResourcesLoader stateResourcesLoader, IFileCache fileCache, IRemoteImageLoader remoteImageLoader, ISourceImageParamsReader imageParamsReader, IRepositoryImageParamsReaderFactory repositoryImageParamsReaderFactory, IPublicImagesProvider publicImagesProvider, IUserImagesProvider userImagesProvider, ISessionContext sessionContext = null)

Methods

CreateImageSource

public ImageItem.ImageSource CreateImageSource(Bitmap bitmap, FileFormat fileFormat)
Parameters
TypeNameDescription
Aurigma.GraphicsMill.Bitmapbitmap
Aurigma.DesignAtoms.Model.Configuration.FileFormatfileFormat
Returns

Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSource

CreateImageSource

public ImageItem.ImageSource CreateImageSource(Stream inputStream, int pageIndex = 0)
Parameters
TypeNameDescription
System.IO.StreaminputStream
System.Int32pageIndex
Returns

Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSource

LoadImage

public string LoadImage(PipelineElement reader, FileFormat fileFormat = FileFormat.Tiff, bool actualSize = false, bool preserveAspectRatio = false)
Parameters
TypeNameDescription
Aurigma.GraphicsMill.PipelineElementreader
Aurigma.DesignAtoms.Model.Configuration.FileFormatfileFormat
System.BooleanactualSize
System.BooleanpreserveAspectRatio
Returns

System.String

LoadImage

public string LoadImage(FileInfo sourceImage, bool allowImageFileDelete = false, string storageId = null)
Parameters
TypeNameDescription
System.IO.FileInfosourceImage
System.BooleanallowImageFileDelete
System.StringstorageId
Returns

System.String

LoadImage

public void LoadImage(ImageItem imageItem, PipelineElement reader, FileFormat fileFormat, bool actualSize = false, bool preserveAspectRatio = false, int pageIndex = 0, bool takeIntoAccountImageDpi = false)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItemimageItem
Aurigma.GraphicsMill.PipelineElementreader
Aurigma.DesignAtoms.Model.Configuration.FileFormatfileFormat
System.BooleanactualSize
System.BooleanpreserveAspectRatio
System.Int32pageIndex
System.BooleantakeIntoAccountImageDpi

LoadImage

public void LoadImage(ImageItem imageItem, FileInfo imageFile, bool actualSize, int pageIndex = 0)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItemimageItem
System.IO.FileInfoimageFile
System.BooleanactualSize
System.Int32pageIndex

LoadImage

public void LoadImage(ImageItem imageItem, FileInfo sourceImage, bool actualSize, bool preserveAspectRatio, bool allowImageFileDelete = false, int pageIndex = 0, bool takeIntoAccountImageDpi = false)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItemimageItem
System.IO.FileInfosourceImage
System.BooleanactualSize
System.BooleanpreserveAspectRatio
System.BooleanallowImageFileDelete
System.Int32pageIndex
System.BooleantakeIntoAccountImageDpi

LoadImage

public string LoadImage(ImageItem.ImageSource source)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSourcesource
Returns

System.String

LoadImage

public void LoadImage(ImageItem item, Stream imageStream, bool actualSize, bool preserveAspectRatio, bool takeIntoAccountImageDpi, int pageIndex = 0, string storageId = null)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItemitem
System.IO.StreamimageStream
System.BooleanactualSize
System.BooleanpreserveAspectRatio
System.BooleantakeIntoAccountImageDpi
System.Int32pageIndex
System.StringstorageId

Update

public Task Update(ImageItem item, bool needToDownloadImage, bool actualSize, bool preserveAspectRatio, bool takeIntoAccountImageDpi, string sourceUrl = null, float xDpi = 72F, float yDpi = 72F)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItemitem
System.BooleanneedToDownloadImage
System.BooleanactualSize
System.BooleanpreserveAspectRatio
System.BooleantakeIntoAccountImageDpi
System.StringsourceUrl
System.SinglexDpi
System.SingleyDpi
Returns

System.Threading.Tasks.Task

DownloadImageSource

public string DownloadImageSource(ImageItem.ImageSource imageSource)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSourceimageSource
Returns

System.String

SetItemImage

public void SetItemImage(ImageItem item, string storageFileId, int pageIndex, bool actualSize, bool preserveAspectRatio, bool takeIntoAccountImageDpi, float xDpi = 72F, float yDpi = 72F)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItemitem
System.StringstorageFileId
System.Int32pageIndex
System.BooleanactualSize
System.BooleanpreserveAspectRatio
System.BooleantakeIntoAccountImageDpi
System.SinglexDpi
System.SingleyDpi

SetImageItemHeight

public void SetImageItemHeight(ImageItem item, float height, bool calculateWidth = true)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItemitem
System.Singleheight
System.BooleancalculateWidth

SetImageItemWidth

public void SetImageItemWidth(ImageItem item, float width, bool calculateHeight = true)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItemitem
System.Singlewidth
System.BooleancalculateHeight

GetExtendedImageSource

public ImageLoader.ExtendedImageSource GetExtendedImageSource(ImageItem.ImageSource imageSource)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSourceimageSource
Returns

Aurigma.DesignAtoms.Canvas.ImageLoader.ExtendedImageSource

GetExtendedImageSourceAsync

public Task<ImageLoader.ExtendedImageSource> GetExtendedImageSourceAsync(ImageItem.ImageSource imageSource)
Parameters
TypeNameDescription
Aurigma.DesignAtoms.Model.Items.ImageItem.ImageSourceimageSource
Returns

System.Threading.Tasks.Task<Aurigma.DesignAtoms.Canvas.ImageLoader.ExtendedImageSource>

Was this page helpful?