Class IfcImage

IfcImage class

Represents an image in IFC format. Contains information about all entities and header information.

public class IfcImage : Image, IDrawingLayout<IIfcEntity>, IHasEntities<IIfcEntity>, 
    IHasLayouts<IDrawingLayout<IIfcEntity>, IIfcEntity>

Properties

NameDescription
virtual AnnotationService { get; }Gets the annotation service.
Bounds { get; }Gets the image bounds.
Container { get; }Gets the Image container.
virtual CustomProperties { get; }Gets or sets the custom properties.
DataStreamContainer { get; }Gets the object’s data stream.
override Depth { get; }Gets the depth. It is calculated from all the entities
Disposed { get; }Gets a value indicating whether this instance is disposed.
Entities { get; }Gets all entities that exists on a drawing. Could be useful for walking through them and check its properties
Header { get; }Gets the header.
override Height { get; }Gets the image height. It is calculated from all the entities
override IsCached { get; }Gets a value indicating whether object’s data is cached currently and no data reading is required. At present time always returns true
Layers { get; }Gets list of all the layers that are present in the image Gets the layers from the image.
LayoutName { get; }
Layouts { get; }
Palette { get; set; }Gets or sets the color palette.
Size { get; }Gets the image size.
virtual UnitlessDefaultUnitType { get; }Assumed unit type when UnitType is set to Unitless
virtual UnitType { get; }Gets current unit type.
virtual WatermarkGuardService { get; }
override Width { get; }Gets the image width. It is calculated from all the entities

Methods

NameDescription
Add(IIfcEntity)
override CacheData()Caches the data and ensures no additional data loading will be performed from the underlying DataStreamContainer. At present time is not implemented for IFC file format
CanSave(ImageOptionsBase)Determines whether image can be saved to the specified file format represented by the passed save options.
Dispose()Disposes the current instance.
override GetStrings()Gets all string values from image. Can be useful to get some text from the image
Save()Saves the image data to the underlying stream.
Save(Stream)Saves the object’s data to the specified stream.
virtual Save(string)Saves the object’s data to the specified file location.
Save(Stream, ImageOptionsBase)Saves the image’s data to the specified stream in the specified file format according to save options.
virtual Save(string, bool)Saves the object’s data to the specified file location.
virtual Save(string, ImageOptionsBase)Saves the object’s data to the specified file location in the specified file format according to save options.
SaveAsync(Stream, ImageOptionsBase)Saves the image’s data to the specified stream in the specified file format according to save options.
virtual SaveAsync(string, ImageOptionsBase)Saves the object’s data to the specified file location in the specified file format according to save options.
virtual ThrowIfCantExportToCad(ImageOptionsBase, Exception)Throw exception if can`t export
TryRemoveEntity(IIfcEntity)

Examples

Loading of the drawing in IFC format.

using (IfcImage ifcImage = (IfcImage)Image.Load(fileName))
{
...
}

See Also