Search Results for

    Show / Hide Table of Contents

    IEmbeddedObjects.GetImage Method

    Returns an image and its type. Note that for SVG images, xlsx files store both a PNG and SVG image. In those cases, for backward compatibility reasons, this method will return the PNG image. To get the SVG, call GetImageAlternate

    Syntax

    Namespace: FlexCel.Core

    public abstract void GetImage(Int32 imageIndex, String objectPath, ref TXlsImgType imageType, Stream outStream, Boolean usesObjectIndex)

    Parameters

    <-> Parameter Type Description
    imageIndex Int32 Index of the image. (1 based)
    objectPath String Object path to the image when it is a grouped image. For toplevel images you can use String.Empty. In other case, you need to use the value returned by GetObjectProperties
    If it is "absolute" (it starts with "\"), then the path includes the objectIndex, and the objectIndex is not used. An object path of "\1\2\3" is exactly the same as using objectIndex = 1 and objectPath = "2\3"
    ref imageType TXlsImgType Returns the image type for the data returned. (If it is a bmp, jpg or other)
    outStream Stream Stream where the image data will be copied.
    usesObjectIndex Boolean If false (the default) then imageIndex is an index to the list of images.
    When true imageIndex is an index to the list of all objects in the sheet. When you have the object id, you can avoid calling ObjectIndexToImageIndex which is a slow method, by setting this parameter to true.

    See also

    • IEmbeddedObjects
    In This Article
    Back to top FlexCel Studio for the .NET Framework v7.24.0.0
    © 2002 - 2025 tmssoftware.com