:orphan:
# PetscDrawOpenImage
Opens an image for use with the `PetscDraw` routines. 
## Synopsis
```
#include "petscdraw.h" 
#include "petscdraw.h" 
PetscErrorCode PetscDrawOpenImage(MPI_Comm comm, const char filename[], int w, int h, PetscDraw *draw)
```
Collective


## Input Parameters

- ***comm -*** the communicator that will share image
- ***filename -*** optional name of the file where the image will be stored
- ***w -*** the image width in pixels
- ***h -*** the image height in pixels



## Output Parameter

- ***draw -*** the drawing context.





## See Also
 `PetscDraw`, `PETSC_DRAW_IMAGE`, `PETSC_DRAW_X`, `PetscDrawSetSave()`, `PetscDrawSetFromOptions()`, `PetscDrawCreate()`, `PetscDrawDestroy()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/draw/impls/image/drawimage.c.html#PetscDrawOpenImage">src/sys/classes/draw/impls/image/drawimage.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/draw/impls/image/drawimage.c)


[Index of all Draw routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
