public static function FromGdValueWithAlpha( $gdValueWithAlpha )
   {

      $a = ( $gdValueWithAlpha >> 24 ) & 0xFF;
      $r = ( $gdValueWithAlpha >> 16 ) & 0xFF;
      $g = ( $gdValueWithAlpha >> 8 )  & 0xFF;
      $b = $gdValueWithAlpha & 0xFF;

      if ( $a == 0 )
      {
         $o = 0;
      }
      else if ( $a == 127 )
      {
         $o = 100;
      }
      else
      {
         $o = \intval( \floor( ( 100 * $a ) / 127 ) );
      }

      return new Color( array( $r, $g, $b ), $o );

   }
public static function FromGdValueWithAlpha( $gdValueWithAlpha )
   {

      $a = ( $gdValueWithAlpha >> 24 ) & 0xFF;
      $r = ( $gdValueWithAlpha >> 16 ) & 0xFF;
      $g = ( $gdValueWithAlpha >> 8 )  & 0xFF;
      $b = $gdValueWithAlpha & 0xFF;

      if ( $a == 0 )
      {
         $o = 0;
      }
      else if ( $a == 127 )
      {
         $o = 100;
      }
      else
      {
         $o = \intval( \floor( ( 100 * $a ) / 127 ) );
      }

      return new Color( array( $r, $g, $b ), $o );

   }
public static function FromGdValueWithAlpha ( $ gdValueWithAlpha ) { $ a = ( $ gdValueWithAlpha >> 24 ) & 0xFF ; $ r = ( $ gdValueWithAlpha >> 16 ) & 0xFF ; $ g = ( $ gdValueWithAlpha >> 8 ) & 0xFF ; $ b = $ gdValueWithAlpha & 0xFF ; if ( $ a == 0 ) { $ o = 0 ; } else if ( $ a == 127 ) { $ o = 100 ; } else { $ o = \ intval ( \ floor ( ( 100 * $ a ) / 127 ) ) ; } return new Color ( array ( $ r , $ g , $ b ) , $ o ) ; }
Converts a GD integer value as color with alpha channel to an \Beluga\Drawing\Color instance.

@param  int $gdValueWithAlpha
@return \Beluga\Drawing\Color
Converts a GD integer value as color with alpha channel to an \ Beluga \ Drawing \ Color instance .