TBitmap.zip

Save TBitmap image to Jpeg format image in Delphi

714

Delphi supports Jpeg unit as well as Bitmap unit for image processing. Following example convert and save bitmap into jpeg format. The source format must be TBitmap instance.unit jpeg;procedure BitmapToJpeg(FileName: string; Img:TGraphic);var  m_jpeg:...

Show *any* graphics as Glyph on a SpeedButton

547

TBitBtn and TSpeedButton accept only BMP pictures, if you have some other picture format, like ICO or JPG, (in an Image component) you want to show as a Glyph, you'll need to "transform" it to Bitmap, here's how:

Array of arguments passed to script in PHP

94

$argv is an array of arguments passed to script in PHP,so you can know the parameters when user run the script.Followings are the example content of $argv.

TImage.Bitmap fade out

375

Put a TImage (Image1) on a Delphi form and load a bitmap of 24 bits or 32 bits in it; put a TButton (Button1) and put this code in its OnClick event:

TColor to HTML color

417

Put a TColorDialog (ColorDialog1),a TLabel (Label1) and a TButton (Button1) in your form,and assign the Button1.OnClick procedure as follows:

Rotating Text

451

Here is an example of text output that is rotated 45 degrees:

Is Point in Polygon?

369

This solution checks how many times you cross a line to pass from point X,Y to the edge of the polygon….

Implementing a lasso drawing technique

390

Here's one approach to drawing a lasso rectangle using Delphi:1.In the OnMouseDown event for the form that you are 'lasso-ing' controls on:2.In the OnMouseMove event for the form….3.In the OnMouseUp event for the form….4.The DrawMarquee procedure….

Grayscaling a bitmap ?

535

This example uses an averaging mechanism to obtain grayscale intensity on a pixel-by-pixel basis.Specifically,it averages the Red,Green and Blue component values of a color and assigns that value back to each RGB component. Usage:Here's the source code can...

How to convert HIcon to TIcon ?

451

Many Windows API functions return a HIcon value (handle to Icon).Here's how to "convert" a HIcon to TIcon (object).For example,when using ExtractIcon to get icon from file,the resulting value is of the HICON type.The answer is: Create a TIcon object and as...

Convert TColor to Hex & Hex to TColor

595

Here are two simple functions to convert color values from TColor to Hex (HTML) and vice versa:function TColorToHex(Color : TColor) : string;begin   Result :=     IntToHex(GetRValue(Color), 2) +     IntToHex(GetGValu...