Imagesharp: BrightnessProcessor incorrectly scales HalfSingle values.

Created on 4 Dec 2020  路  4Comments  路  Source: SixLabors/ImageSharp

Prerequisites

  • [X] I have written a descriptive issue title
  • [X] I have verified that I am running the latest version of ImageSharp
  • [X] I have verified if the problem exist in both DEBUG and RELEASE mode
  • [X] I have searched open and closed issues to ensure it has not already been reported

Description

BrightnessProcessor simply scales values with no regard for values like HalfSingle whose minimum value is not zero. Presumably other FilterProcessors also have this problem.

Steps to Reproduce

Create an Image<HalfSingle> with -1 pixel values and apply a brightness scale to it. The image should remain the same, instead -1 values will be multiplied by the scale.

bug

All 4 comments

@JimBobSquarePants To/FromScaledVector4 should also apply an offset?

@antonfirsov ScaledVector is fine, we鈥檙e just not using it in the processor.

Should be an easy PR if you鈥檙e keen @maxvoxel8 ?

Sure, I can take a look.

Was this page helpful?
0 / 5 - 0 ratings