---
name: "PS_open_image_file"
section: "3"
platform: "linux"
package: "pslib-dev"
version: "0.4.8-1+b1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/PS_open_image_file"
---

# PS\_open\_image\_file(3)

Opens an image from file

## NAME

PS\_open\_image\_file — Opens an image from file

## SYNOPSIS

\#include \<pslib.h\>

int PS\_open\_image\_file(PSDoc \*psdoc, const char \*type, const char \*filename, const char \*stringparam, int intparam)

## DESCRIPTION

This function reads image data from a file. It can read png, jpeg,  gif, tiff, and eps files. png, jpeg, gif, and tiff images can only  be read if pslib has been compiled with support for those formats.  Once an image has been loaded it can be placed on a page with  **[PS\_place\_image(3)](/PS_place_image/3.md)**.

Since version 0.4.5 of pslib images are read by default for later  reuse. This means that the image is saved into a so called reusable  stream object. Later calls of **[PS\_place\_image(3)](/PS_place_image/3.md)** 			will only put a short  sequence of postscript code into the output file replaying the image.  This reduces the overall postscript file size, speeds up its processing by  the postscript rip and allows to place images into templates. This  behaviour can be turned off by setting the parameter \`imagereuse'  to false with **[PS\_set\_parameter(3)](/PS_set_parameter/3.md)**.

## RETURN VALUE

Returns identifier of image or zero in case of an error.  The identifier is a positiv number greater 0.

## SEE ALSO

[PS\_open\_image(3)](/PS_open_image/3.md), [PS\_place\_image(3)](/PS_place_image/3.md), [PS\_close\_image(3)](/PS_close_image/3.md)

## AUTHOR

This manual page was written by Uwe Steinmann uwe@steinmann.cx.
