ImageEn

TIEBitmap.AlphaChannel Code Samples


Code samples for AlphaChannel.
Automatically generated by the Every Method demo.
// Automated test of AlphaChannel
// AlphaChannel: Image has no transparency
b := ImageEnView1.IEBitmap.HasAlphaChannel();



// Automated test of AlphaChannel - Alpha Channel
// AlphaChannel: Image is 0% transparent
ImageEnView1.IEBitmap.Assign( ImageEnView2.IEBitmap.AlphaChannel );
dd := ImageEnView1.Proc.CalcImageTransparency();



// Automated test of AlphaChannel - 32-Bit RGBA
// AlphaChannel: Image is 0% transparent
ImageEnView1.IEBitmap.Assign( ImageEnView2.IEBitmap.AlphaChannel );
dd := ImageEnView1.Proc.CalcImageTransparency();



// Automated test of AlphaChannel - 1-bit
// AlphaChannel: Image has no transparency
b := ImageEnView1.IEBitmap.HasAlphaChannel();



// Automated test of AlphaChannel Creation (1 bit) - Typical Values
// Assigning to AlphaChannel (Assigning monochrome image)
bmp.LoadFromFile( 'D:\Monochrome_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (1 bit) - Alpha Channel - Typical Values
// Assigning to AlphaChannel (Assigning monochrome image)
bmp.LoadFromFile( 'D:\Monochrome_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (1 bit) - 32-Bit RGBA - Typical Values
// Assigning to AlphaChannel (Assigning monochrome image)
bmp.LoadFromFile( 'D:\Monochrome_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (1 bit) - 1-bit - Typical Values
// Assigning to AlphaChannel (Assigning monochrome image)
bmp.LoadFromFile( 'D:\Monochrome_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (8 bit) - Typical Values
// Assigning to AlphaChannel (Assigning 256 color image)
bmp.LoadFromFile( 'D:\8bpp_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (8 bit) - Alpha Channel - Typical Values
// Assigning to AlphaChannel (Assigning 256 color image)
bmp.LoadFromFile( 'D:\8bpp_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (8 bit) - 32-Bit RGBA - Typical Values
// Assigning to AlphaChannel (Assigning 256 color image)
bmp.LoadFromFile( 'D:\8bpp_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (8 bit) - 1-bit - Typical Values
// Assigning to AlphaChannel (Assigning 256 color image)
bmp.LoadFromFile( 'D:\8bpp_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Drawing - Typical Values
// Draw text and ellipse to AlphaChannel (255/172)
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.DrawText( 'ImageEn!', x, 0 );
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Brush.Transparency := 172;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Ellipse( x1, y1, x2, y2 );
ImageEnView1.IEBitmap.AlphaChannel.Negative();
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Drawing - Alpha Channel - Typical Values
// Draw text and ellipse to AlphaChannel (255/172)
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.DrawText( 'ImageEn!', x, 0 );
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Brush.Transparency := 172;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Ellipse( x1, y1, x2, y2 );
ImageEnView1.IEBitmap.AlphaChannel.Negative();
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Drawing - 32-Bit RGBA - Typical Values
// Draw text and ellipse to AlphaChannel (255/172)
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.DrawText( 'ImageEn!', x, 0 );
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Brush.Transparency := 172;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Ellipse( x1, y1, x2, y2 );
ImageEnView1.IEBitmap.AlphaChannel.Negative();
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Drawing - 1-bit - Typical Values
// Draw text and ellipse to AlphaChannel (255/172)
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.DrawText( 'ImageEn!', x, 0 );
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Brush.Transparency := 172;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Ellipse( x1, y1, x2, y2 );
ImageEnView1.IEBitmap.AlphaChannel.Negative();
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel - Random Values
// AlphaChannel: Image is 0% transparent
ImageEnView2.Proc.SetTransparentColors( TColor2TRGB( clWhite ), 50, 0 );
ImageEnView1.IEBitmap.Assign( ImageEnView2.IEBitmap.AlphaChannel );
dd := ImageEnView1.Proc.CalcImageTransparency();



// Automated test of AlphaChannel - Alpha Channel - Random Values
// AlphaChannel: Image is 0% transparent
ImageEnView2.Proc.SetTransparentColors( TColor2TRGB( clWhite ), 50, 0 );
ImageEnView1.IEBitmap.Assign( ImageEnView2.IEBitmap.AlphaChannel );
dd := ImageEnView1.Proc.CalcImageTransparency();



// Automated test of AlphaChannel - 32-Bit RGBA - Random Values
// AlphaChannel: Image is 0% transparent
ImageEnView2.Proc.SetTransparentColors( TColor2TRGB( clWhite ), 50, 0 );
ImageEnView1.IEBitmap.Assign( ImageEnView2.IEBitmap.AlphaChannel );
dd := ImageEnView1.Proc.CalcImageTransparency();



// Automated test of AlphaChannel - 1-bit - Random Values
// AlphaChannel: Image is 0% transparent
ImageEnView2.Proc.SetTransparentColors( TColor2TRGB( clWhite ), 50, 0 );
ImageEnView1.IEBitmap.Assign( ImageEnView2.IEBitmap.AlphaChannel );
dd := ImageEnView1.Proc.CalcImageTransparency();



// Automated test of AlphaChannel Creation (1 bit) - Random Values
// Assigning to AlphaChannel (Assigning monochrome image)
bmp.LoadFromFile( 'D:\Monochrome_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (1 bit) - Alpha Channel - Random Values
// Assigning to AlphaChannel (Assigning monochrome image)
bmp.LoadFromFile( 'D:\Monochrome_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (1 bit) - 32-Bit RGBA - Random Values
// Assigning to AlphaChannel (Assigning monochrome image)
bmp.LoadFromFile( 'D:\Monochrome_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (1 bit) - 1-bit - Random Values
// Assigning to AlphaChannel (Assigning monochrome image)
bmp.LoadFromFile( 'D:\Monochrome_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (8 bit) - Random Values
// Assigning to AlphaChannel (Assigning 256 color image)
bmp.LoadFromFile( 'D:\8bpp_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (8 bit) - Alpha Channel - Random Values
// Assigning to AlphaChannel (Assigning 256 color image)
bmp.LoadFromFile( 'D:\8bpp_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (8 bit) - 32-Bit RGBA - Random Values
// Assigning to AlphaChannel (Assigning 256 color image)
bmp.LoadFromFile( 'D:\8bpp_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Creation (8 bit) - 1-bit - Random Values
// Assigning to AlphaChannel (Assigning 256 color image)
bmp.LoadFromFile( 'D:\8bpp_image.bmp' );
ImageEnView1.IEBitmap.AlphaChannel.Assign( bmp );
ImageEnView1.IEBitmap.SyncAlphaChannel(); // Ensure alpha channel is correct size and color depth
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Drawing - Random Values
// Draw text and ellipse to AlphaChannel (128/235)
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.DrawText( 'ImageEn!', x, 0 );
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Brush.Transparency := 235;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Ellipse( x1, y1, x2, y2 );
ImageEnView1.IEBitmap.AlphaChannel.Negative();
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Drawing - Alpha Channel - Random Values
// Draw text and ellipse to AlphaChannel (128/235)
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.DrawText( 'ImageEn!', x, 0 );
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Brush.Transparency := 235;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Ellipse( x1, y1, x2, y2 );
ImageEnView1.IEBitmap.AlphaChannel.Negative();
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Drawing - 32-Bit RGBA - Random Values
// Draw text and ellipse to AlphaChannel (128/235)
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.DrawText( 'ImageEn!', x, 0 );
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Brush.Transparency := 235;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Ellipse( x1, y1, x2, y2 );
ImageEnView1.IEBitmap.AlphaChannel.Negative();
ImageEnView1.Update(); // Show changes in our viewer



// Automated test of AlphaChannel Drawing - 1-bit - Random Values
// Draw text and ellipse to AlphaChannel (128/235)
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.DrawText( 'ImageEn!', x, 0 );
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Brush.Transparency := 235;
ImageEnView1.IEBitmap.AlphaChannel.IECanvas.Ellipse( x1, y1, x2, y2 );
ImageEnView1.IEBitmap.AlphaChannel.Negative();
ImageEnView1.Update(); // Show changes in our viewer