Encapsulates the GDI+ Image class. The Image class provides methods for loading and saving raster images (bitmaps) and vector images (metafiles). An Image object encapsulates a bitmap or a metafile and stores attributes that you can retrieve by calling various Get methods. You can construct Image objects from a variety of file types including BMP, ICON, GIF, JPEG, Exif, PNG, TIFF, WMF, and EMF.
To create a VCL TBitmap from the image, call CreateBitmap method. To copy a VCL TBitmap or TGraphic to the image, call Image.Assign(Bitmap) method.
Namespace: RSGdiPlusGraphics
|
Name
|
Description
|
|
Create(String,Boolean)
|
Overloaded. Creates an image from the given filename. The useEmbeddedColorManagement parameter determines if the constructor should use the color correction according to color management information that is embedded in the image file. Embedded information can include ICC profiles, gamma values, and chromaticity information.
|
|
Create(TStream,Boolean)
|
Overloaded. Creates an image from the given stream. The useEmbeddedColorManagement parameter determines if the constructor should use the color correction according to color management information that is embedded in the image stream. Embedded information can include ICC profiles, gamma values, and chromaticity information.
|
Top
|
|
Name
|
Description
|
|
BitsPerPixel
|
Returns the number of bits per pixel
|
|
Bmp
|
Returns the image codec (encoder/decoder) for bitmaps
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
|
|
Canvas
|
Returns the canvas that owns the image
|
|
Decoders
|
Returns an array of all the image decoders supported by GDI+.
Windows GDI+ provides the Image class and the Bitmap class for storing images in memory and manipulating images in memory. GDI+ writes images to disk files with the help of image encoders and loads images from disk files with the help of image decoders. An encoder translates the data in an Image or Bitmap object into a designated disk file format. A decoder translates the data in a disk file to the format required by the Image and Bitmap objects. GDI+ has built-in encoders and decoders that support the following file types:
• BMP • GIF • JPEG • PNG • TIFF
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GDI+ also has built-in decoders that support the following file types:
• WMF
• EMF
• ICON |
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
EmbeddedColorManagement
Returns whether the image applies color correction according to color management information that is embedded in the stream. Embedded information can include ICC profiles, gamma values, and chromaticity information.
Encoders
Returns an array of all the image encoders supported by GDI+.
Windows GDI+ provides the Image class and the Bitmap class for storing images in memory and manipulating images in memory. GDI+ writes images to disk files with the help of image encoders and loads images from disk files with the help of image decoders. An encoder translates the data in an Image or Bitmap object into a designated disk file format. A decoder translates the data in a disk file to the format required by the Image and Bitmap objects. GDI+ has built-in encoders and decoders that support the following file types:
• BMP
• GIF
• JPEG
• PNG
• TIFF
GDI+ also has built-in decoders that support the following file types:
• WMF
• EMF
• ICON
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
Flags
Returns a set of flags that indicate certain attributes of this Image object.
Gif
Returns the image codec (encoder/decoder) for GIFs
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
Handle
Handle of the graphics object, used by the MS GDI+ flat API routines (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
Height
Return the height, in pixels, of the image
HorizontalResolution
Returns the horizontal resolution, in dots per inch, of this image.
ImageType
Return the image type (bitmap, metafile, or unknown) of the image
Jpeg
Returns the image codec (encoder/decoder) for JPEGs
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
OnChange
Occurs when the graphics object changes.
Note
|
There are two events that are exactly the same, OnChanged and OnChange. The extra event name is to allow easier transition from other Delphi libraries, either the VCL (OnChanged) or FMX (OnChange) libraries. Use either one as needed. Only one event is triggered.
|
OnChanged
Occurs when the graphics object changes.
Note
|
There are two events that are exactly the same, OnChanged and OnChange. The extra event name is to allow easier transition from other Delphi libraries, either the VCL (OnChanged) or FMX (OnChange) libraries. Use either one as needed. Only one event is triggered.
|
Owner
Canvas that owns the object. The Canvas will free this graphics object if it is destroyed. However, to keep memory use under control, it is recommended that you free graphics objects when you are finished with them. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
PixelFormat
Returns the pixel format of this Image object.
PixelFormatFlags
Returns a set of flags about the pixel format
Png
Returns the image codec (encoder/decoder) for PNGs
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
RawFormat
Return a globally unique identifier ( GUID) that identifies the format of this Image object.
Tiff
Returns the image codec (encoder/decoder) for TIFFs
Note
|
Note that this is a class property and as such an object does not need to be created to access the property
|
VerticalResolution
Returns the vertical resolution, in dots per inch, of this image.
Width
Return the width, in pixels, of the image
Top
|
Name
|
Description
|
|
Assign(IRSGPImage)
|
Overloaded. Copies the input image to the current image
|
|
Assign(TPersistent)
|
Overloaded. Copies the data and properties of the source image to the current image. Can also be used to copy VCL graphic images to the current image.
|
|
Changed
|
Call this method when the graphics object changes. It triggers an OnChange event. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
Clone
|
Creates a copy of the current image. It is the responsibility of the calling routing to free the new image.
|
|
CloneI
|
Creates a copy of the current image. It is the responsibility of the calling routing to free the new image.
|
|
CreateBitmap
|
Overloaded. Creates a VCL TBitmap from the image. It is the responsibility of the calling routing to free the bitmap.
|
|
CreateBitmap(TRectF)
|
Overloaded. Creates a VCL TBitmap from a portion of the image. It is the responsibility of the calling routing to free the bitmap.
|
|
GetBounds
|
Get the bounds rectangle, in pixels, of the image
|
|
GetCodec(Integer)
|
Returns the codec at the specified index in the list of codecs
|
|
GetDecoders
|
Returns an array of decoders
|
|
GetEncoders
|
Returns an array of encoders
|
|
GetHandle
|
Call this method to acquire a handle from the GDI+ flat API library (Overrides RSGdiPlusGraphics.TRSGPGraphicsObject.GetHandle.)
|
|
GetHeight
|
Returns the height, in pixels, of the image
|
|
GetHorizontalResolution
|
Returns the horizontal resolution, in dots per inch, of this image.
|
|
GetThumbnail(Cardinal,Cardinal)
|
Overloaded. Creates a thumbnail image based on the current image. It is the responsibility of the calling routing to free the new thumbnail.
|
|
GetThumbnail(Cardinal,Cardinal,ImageAbort,Pointer)
|
Overloaded. Creates a thumbnail image based on the current image. It is the responsibility of the calling routing to free the new thumbnail.
|
|
GetThumbnailAbort(Cardinal,Cardinal,ImageAbort,Pointer)
|
Creates a thumbnail image based on the current image. It is the responsibility of the calling routing to free the new thumbnail.
|
|
GetThumbnailI(Cardinal,Cardinal)
|
Creates a thumbnail image based on the current image. It is the responsibility of the calling routing to free the new thumbnail.
|
|
GetVerticalResolution
|
Returns the vertical resolution, in dots per inch, of this image.
|
|
GetWidth
|
Returns the width, in pixels, of the image
|
|
IndexOfCodec(TRSGPImageCodecInfos,TGUID)
|
Returns the index of the codecs array that matches the aCodec GUID.
|
|
InitializeCodecs
|
Retrieves all the codecs from GDI+
|
|
LoadFromFile(String)
|
Load the image from a file
|
|
LoadFromStream(TStream)
|
Load the image from a stream
|
|
Notification(TRSGPCanvas)
|
Called when the Canvas is releasing control of the graphics object. The canvas will no longer be responsible for freeing the graphics object. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
Prepare(TRectF,Single)
|
Prepare the graphics object for drawing. Graphics objects respond in this method to upcoming calls. For example, gradient brushes can make sure the gradient will cover the entire rectangle. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
QueryInterface(TGUID,Void)
|
Represents method QueryInterface(TGUID,Void). (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
ReleaseHandle
|
Releases the underlying GDI+ object back to the GDI+ library. (Overrides RSGdiPlusGraphics.TRSGPGraphicsObject.ReleaseHandle.)
|
|
RotateFlip(TRSGPRotateFlip)
|
Rotates and flips this image.
|
|
SaveToFile(String)
|
Overloaded. Saves this image to a stream based on file extension of the filename
|
|
SaveToFile(String,TGUID,PGPEncoderParameters)
|
Overloaded. Saves this image to a file based on the Clsid format specified
|
|
SaveToStream(TStream,TGUID,PGPEncoderParameters)
|
Saves this image to a stream based on the Clsid format specified
|
|
Update
|
Update native graphics object (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
_AddRef
|
Represents method _AddRef. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
|
_Release
|
Represents method _Release. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
Top
|