
## ImageDevice class

Represents rendering to raster formats: jpeg, png, bmp, gif, tiff.



**Inheritance:** [`ImageDevice`](/html/python-net/aspose.html.rendering.image/imagedevice) → 
[`Device`](/html/python-net/aspose.html.rendering/device)



The ImageDevice type exposes the following members:

### Constructors
| Constructor | Description |
| :- | :- |
| [__init__](/html/python-net/aspose.html.rendering.image/imagedevice/__init__/#aspose.html.io.ICreateStreamProvider) | Initializes a new instance of the [`ImageDevice`](/html/python-net/aspose.html.rendering.image/imagedevice) class. |
| [__init__](/html/python-net/aspose.html.rendering.image/imagedevice/__init__/#aspose.html.rendering.image.ImageRenderingOptions-aspose.html.io.ICreateStreamProvider) | Initializes a new instance of the [`ImageDevice`](/html/python-net/aspose.html.rendering.image/imagedevice) class by rendering options and stream provider. |
| [__init__](/html/python-net/aspose.html.rendering.image/imagedevice/__init__/#str) | Initializes a new instance of the [`ImageDevice`](/html/python-net/aspose.html.rendering.image/imagedevice) class. |
| [__init__](/html/python-net/aspose.html.rendering.image/imagedevice/__init__/#aspose.html.rendering.image.ImageRenderingOptions-str) | Initializes a new instance of the [`ImageDevice`](/html/python-net/aspose.html.rendering.image/imagedevice) class by rendering options and output file name. |
| [__init__](/html/python-net/aspose.html.rendering.image/imagedevice/__init__/#io.RawIOBase) | Initializes a new instance of the [`ImageDevice`](/html/python-net/aspose.html.rendering.image/imagedevice) class. |
| [__init__](/html/python-net/aspose.html.rendering.image/imagedevice/__init__/#aspose.html.rendering.image.ImageRenderingOptions-io.RawIOBase) | Initializes a new instance of the [`ImageDevice`](/html/python-net/aspose.html.rendering.image/imagedevice) class by rendering options and output stream. |


### Properties
| Property | Description |
| :- | :- |
| [options](/html/python-net/aspose.html.rendering.image/imagedevice/options) |  |
| [graphic_context](/html/python-net/aspose.html.rendering.image/imagedevice/graphic_context) |  |


### Methods
| Method | Description |
| :- | :- |
| [save_graphic_context](/html/python-net/aspose.html.rendering.image/imagedevice/save_graphic_context/#) |  |
| [restore_graphic_context](/html/python-net/aspose.html.rendering.image/imagedevice/restore_graphic_context/#) |  |
| [begin_document](/html/python-net/aspose.html.rendering.image/imagedevice/begin_document/#aspose.html.dom.Document) |  |
| [end_document](/html/python-net/aspose.html.rendering.image/imagedevice/end_document/#) |  |
| [begin_page](/html/python-net/aspose.html.rendering.image/imagedevice/begin_page/#aspose.pydrawing.SizeF) |  |
| [end_page](/html/python-net/aspose.html.rendering.image/imagedevice/end_page/#) |  |
| [flush](/html/python-net/aspose.html.rendering.image/imagedevice/flush/#) |  |
| [begin_element](/html/python-net/aspose.html.rendering.image/imagedevice/begin_element/#aspose.html.dom.Element-aspose.pydrawing.RectangleF) |  |
| [end_element](/html/python-net/aspose.html.rendering.image/imagedevice/end_element/#aspose.html.dom.Element) |  |
| [close_path](/html/python-net/aspose.html.rendering.image/imagedevice/close_path/#) |  |
| [move_to](/html/python-net/aspose.html.rendering.image/imagedevice/move_to/#aspose.pydrawing.PointF) |  |
| [line_to](/html/python-net/aspose.html.rendering.image/imagedevice/line_to/#aspose.pydrawing.PointF) |  |
| [add_rect](/html/python-net/aspose.html.rendering.image/imagedevice/add_rect/#aspose.pydrawing.RectangleF) |  |
| [cubic_bezier_to](/html/python-net/aspose.html.rendering.image/imagedevice/cubic_bezier_to/#aspose.pydrawing.PointF-aspose.pydrawing.PointF-aspose.pydrawing.PointF) |  |
| [stroke](/html/python-net/aspose.html.rendering.image/imagedevice/stroke/#) |  |
| [fill](/html/python-net/aspose.html.rendering.image/imagedevice/fill/#aspose.html.rendering.FillRule) |  |
| [clip](/html/python-net/aspose.html.rendering.image/imagedevice/clip/#aspose.html.rendering.FillRule) |  |
| [stroke_and_fill](/html/python-net/aspose.html.rendering.image/imagedevice/stroke_and_fill/#aspose.html.rendering.FillRule) |  |
| [fill_text](/html/python-net/aspose.html.rendering.image/imagedevice/fill_text/#str-aspose.pydrawing.PointF) |  |
| [stroke_text](/html/python-net/aspose.html.rendering.image/imagedevice/stroke_text/#str-aspose.pydrawing.PointF) |  |
| [draw_image](/html/python-net/aspose.html.rendering.image/imagedevice/draw_image/#bytes-aspose.html.drawing.WebImageFormat-aspose.pydrawing.RectangleF) |  |



### See Also
* module [`aspose.html.rendering.image`](..)
* class [`Device`](/html/python-net/aspose.html.rendering/device)
* class [`ImageDevice`](/html/python-net/aspose.html.rendering.image/imagedevice)
