# Why loading a video with Flash (AS3) changes the pixel colors a bit?

**URL:** <https://forum.kirupa.com/t/why-loading-a-video-with-flash-as3-changes-the-pixel-colors-a-bit/330031>\
**Category:** flash\
**Created:** [November 20, 2012, 10:30pm UTC](https://forum.kirupa.com/t/why-loading-a-video-with-flash-as3-changes-the-pixel-colors-a-bit/330031 "2012-11-20T22:30:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flivor2012](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@Flivor2012](https://forum.kirupa.com/u/Flivor2012)\
**Post date:** [November 20, 2012, 10:30pm UTC](https://forum.kirupa.com/t/why-loading-a-video-with-flash-as3-changes-the-pixel-colors-a-bit/330031/1 "2012-11-20T22:30:08Z")

</div>

[COLOR=#000000][FONT=verdana]I have a video (MP4) I load using Flash (AS3). I load the video locally using NetStream object, and when I sample the pixels - they are a bit ‘off’.[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]To test this - I prepared a video with 100 frames of only red pixels (all the pixels are 0xFF0000).[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]When I load this video using flash’s NetStream class, and then use ‘getPixel’ to test the pixel color of a frame shown, I get that the pixel color is:[/FONT][/COLOR]  
[LIST]  
[_]R = 255  
[_]G = 12  
[\*]B = 0  
[/LIST]  
[COLOR=#000000][FONT=verdana]Why is the ‘green’ value not 0 ??[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]Also, when I load a video that contains only green frames, the value of the pixel after Flash loaded it is :[/FONT][/COLOR]  
[LIST]  
[_]R = 0  
[_]G = 232  
[\*]B = 0  
[/LIST]  
[COLOR=#000000][FONT=verdana]Only the blue video frame are correct (0,0,255).[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]Why is this ? can it be that flash is decoded the video and performing some processing on it that changes the colors ?[/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]I need the colors to be exact, because I sample different pixels to detect stuff, and I need the colors to be shown exactly like they really are in the video ![/FONT][/COLOR]

[COLOR=#000000][FONT=verdana]Thanks.[/FONT][/COLOR]
