in reply to Re^2: Imager : read image from scalar (not from file)
in thread Imager : read image from scalar (not from file)

The section on Input and output in Imager::Files describes the I/O options you can supply for read(), write(), read_multi() and write_multi().

There's an example using read() from a scalar in the Imager::Files SYNOPSIS.

  • Comment on Re^3: Imager : read image from scalar (not from file)

Replies are listed 'Best First'.
Re^4: Imager : read image from scalar (not from file)
by bliako (Abbot) on Aug 21, 2018 at 08:40 UTC

    I have totally missed the one in the SYNOPSIS, sorry. Should I use a scalar for read and a ref for write?:

    $img->read(data => $data) or die; or $img->write(data => \$data, type => $type) or die;