Share

AcDbRasterImageDef::openImage

C++

virtual Acad::ErrorStatus openImage(
    Atil::Image*& pImage
);

Description

Opens the associated image data object for writing, and returns a pointer to it. (See ATIL documentation for information about the Atil::Image class.) Each call to openImage must eventually be followed by a call to AcDbRasterImageDef::closeImage().

This function is intended for use by raster editing application developers for image modification operations only. (Use AcDbRasterImageDef::imageCopy() for read-only access to the image data.) The image returned by this function is the image being displayed. Any modifications to that image will appear the next time the image is redrawn. A copy of the image is automatically saved for Undo.

You may call openImage, then close the AcDbRasterImageDef object without calling closeImage. This is called a "long term write lock." You can modify the image data at will while you hold the Atil::Image pointer. Any changes made in the image data appear the next time the image entities are redrawn. The write lock should not be held so long as to interfere with other user commands such as Image Reload, Unload and Detach.

Returns Acad::eOk if successful, Acad::eNotApplicable if the image could not be loaded, or Acad::eWasOpenForWrite if the image is already open.

Parameters

Parameters Description
pImage Image object

Links

AcDbRasterImageDef

Was this information helpful?