Method: Vips::Image.thumbnail

Defined in:
lib/vips/methods.rb

.thumbnail(filename, width, **opts) ⇒ Vips::Image

Generate thumbnail from file.

Parameters:

  • filename (String)

    Filename to read from

  • width (Integer)

    Size to this width

  • opts (Hash)

    Set of options

Options Hash (**opts):

  • :height (Integer)

    Size to this height

  • :size (Vips::Size)

    Only upsize, only downsize, or both

  • :no_rotate (Boolean)

    Don't use orientation tags to rotate image upright

  • :crop (Vips::Interesting)

    Reduce to fill target rectangle, then crop

  • :linear (Boolean)

    Reduce in linear light

  • :input_profile (String)

    Fallback input profile

  • :output_profile (String)

    Fallback output profile

  • :intent (Vips::Intent)

    Rendering intent

  • :fail_on (Vips::FailOn)

    Error level to fail on

Returns:



# File 'lib/vips/methods.rb', line 2407