Skip to content

ImageSizer gamma correction should be turned OFF by default #1075

Open
@fijha

Description

@fijha

Short description of the issue

I have recently noticed that imageSizer is crushing blacks in my images. The problem lies in gamma correction. I'm not sure why gamma correction is applied by default. This should be turned OFF.

Expected behavior

The original quality of image (gamma, color, etc) should not be changed. Maybe sharpening should also be turned OFF by default.

Actual behavior

Something is wrong with gamma correction…

Screenshots that demonstrate the issue

'defaultGamma' => -1,
'quality' => 90

gradient-(gamma-off)

// 'defaultGamma' => 2.0, // default
'quality' => 90

gradient-(gamma-on)

Suggestion for a possible fix

Don't apply any gamma correction. Use 'defaultGamma' => -1 in wire/config.php.

The default gamma in wire/config.php is set to 2.0, which is strange because standard gamma should be 2.2. But I've tried different values and the results are always bad.

Setup/Environment

  • ProcessWire version: 3.0.148
  • PHP version: 7.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions