### Method

# Vips Image pngsave_target

#### Declaration [src]

    int
    vips_pngsave_target (
      VipsImage* in,
      VipsTarget* target,
      ...
    )

#### Description [src]

As `vips_pngsave()`, but save to a target.

Optional arguments

- `compression`: `gint`, compression level
- `interlace`: `gboolean`, interlace image
- `filter`: `VipsForeignPngFilter`, row filter flag(s)
- `palette`: `gboolean`, enable quantisation to 8bpp palette
- `Q`: `gint`, quality for 8bpp quantisation
- `dither`: `gdouble`, amount of dithering for 8bpp quantization
- `bitdepth`: `gint`, set write bit depth to 1, 2, 4, 8 or 16
- `effort`: `gint`, quantisation CPU effort

See also

`vips_pngsave()`, `vips_image_write_to_target()`.

This method is not directly available to language bindings.

#### Parameters

`target`

  Type: `VipsTarget`

  Save image to this target.

  The data is owned by the caller of the method.

`...`

  Type: ``

  `NULL`-terminated list of optional named arguments.

#### Return value

Type: `int`

0 on success, -1 on error.