• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

AdjustColor incorrect work with brightness or hue 0 values

Engaged ,
May 27, 2017 May 27, 2017

Copy link to clipboard

Copied

Bug tracker link: Tracker

Problem Description:

When you use AdjustColor and set all it properties then set again brightness or hue to 0 value in result you get that AdjustColor::CalculateFinalFlatArray() method don't change it result.

It's very old bug described even there in 2012 (4 years ago!): http://stackoverflow.com/questions/10172393/as3-adjust-image-colors

It has been tested with many different Flash Player and AIR versions from 10.3 to 22 beta. The same problem in all cases.

It's a big problem for work with filters.

Steps to Reproduce:

1) Create AdjustColor object

2) Set it properties (brightness, contrast, hue and saturation) with values

3) Set again (change) brightness or hue value to 0.

4) get AdjustColor::CalculateFinalFlatArray() method result

Launch code below. Application example with sources attached.

ActionScript 3.0 code:

var adjustColor:AdjustColor = new AdjustColor();

adjustColor.brightness = 50;

adjustColor.contrast = 0;

adjustColor.hue = 0;

adjustColor.saturation = 0;

trace("Before changes:", adjustColor.CalculateFinalFlatArray());//Before changes: 1,0,0,0,50,0,1,0,0,50,0,0,1,0,50,0,0,0,1,0

adjustColor.brightness = 0;

trace("Actual result:", adjustColor.CalculateFinalFlatArray());//Actual result: 1,0,0,0,50,0,1,0,0,50,0,0,1,0,50,0,0,0,1,0

adjustColor = new AdjustColor();

adjustColor.brightness = 0;

adjustColor.contrast = 0;

adjustColor.hue = 0;

adjustColor.saturation = 0;

trace("Expected result:", adjustColor.CalculateFinalFlatArray());//Expected result: 1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0

Actual Result:

1,0,0,0,50,0,1,0,0,50,0,0,1,0,50,0,0,0,1,0

Expected Result:

1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0

Any Workarounds: recreate AdjustColor instead of reuse it:

var adjustColor:AdjustColor = new AdjustColor();

Views

564

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Sep 03, 2017 Sep 03, 2017

Copy link to clipboard

Copied

This issue still exists with latest AIR 27.0.0.116 beta and Animate CC 2017.5

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 10, 2018 Feb 10, 2018

Copy link to clipboard

Copied

LATEST

This issue still exists with latest AIR 29.0.0.96 beta and Animate CC 18.0.1

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines