interlace — Toggle interlaced mode

Description

public Intervention\Image\Image interlace([boolean $interlace]])

Determine whether an image should be encoded in interlaced or standard mode by toggling interlace mode with a boolean parameter. If an JPEG image is set interlaced the image will be processed as a progressive JPEG.

Parameters

interlace (optional)

If interlace is set to boolean true the image will be encoded interlaced. If the parameter is set to false interlaced mode is turned off. Default: true

Return Values

Instance of Intervention\Image\Image

Examples

  1. // open image
  2. $img = Image::make('public/foo.png');
  3. // enable interlacing
  4. $img->interlace();
  5. // save image interlaced
  6. $img->save();
  7. // open interlaced image
  8. $img = Image::make('public/interlaced.gif');
  9. // disable interlacing
  10. $img->interlace(false);
  11. // save image in standard mode
  12. $img->save();

See also