About


Getting Started
 Previous Top Next
Icon Editor was developed by Adirondack Software in conjunction with HiComponents to demonstrate icon loading, icon saving, and icon editing using Windows API GDI canvas drawing techniques.

Due to the high level of zooming necessary for viewing and editing icons a number of special techniques are demonstrated so that ImageENView works well with bitmap canvas and alpha channel canvas drawing.

Icon Editor permits loading, editing and saving single frame or multi-frame icon files. Any icon file dimension or bit-depth supported by ImageEn are supported. Icon bit-depths from 1-bit to 32-bit with alpha channel are supported.

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker may be downloaded here:
http://www.vizacc.com/downloads/avhelp71443.exe
HelpMaker is an application to create help files without an expensive word- processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files.
HelpMaker has no limitations, no time-outs, no nags, no adware, no banner ads and no spyware. It is 100% free. Other than this product, there is no free help authoring tool for WinHelp and HTML-Help.


Development
This ImageEn Icon Editor Demo was developed with Delphi 7 and ImageEn version 2.1.x through version 2.2. Source code is provided as a download at the ImageEn website.
http://www.hicomponents.com .

Only ImageEn and standard Delphi 7 components were used for program development.
Windows HTMLHelp file loading code is included.

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker may be downloaded here:
http://www.vizacc.com/downloads/avhelp71443.exe
HelpMaker is an application to create help files without an expensive word- processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files.


Actions
Toolbar and Menu Actions
· New- Create a blank or empty icon frame
· Open- Open an icon from a file
· Save- Save icon to existing file
· SaveAs- Save icon with a new file name.
· Close-Close all icon frames
· Cut- Cut selection to clipboard
· Copy- Copy selection to the clipboard
· Paste- Paste the clipboard image to selection
· Select
1. None - Select None
2. Rectangle- Select rectangle
3. Ellipse- Select ellipse
4. Zoom- Zoom In or Out
5. Magic Wand- Magic wand selection
6. Polygon- Polygon selection
7. Lasso- Lasso selection
8. Icon- Select icon sized selection (32x32)
9. Magic Wand Options - Set Magic wand options
10. Invert Selection- invert the selected area
· Undo- Undo the last change
· Redo- Undo the last undo
· Crop- Crop to selection
· Exit

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker may be downloaded here:
http://www.vizacc.com/downloads/avhelp71443.exe
HelpMaker is an application to create help files without an expensive word- processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files.


Tools
Basic Tools
· Point - Paint a single pixel with a color and alpha value
· Line - Draw a line with various pen widths, colors and alpha values
· Rectangle - Draw a rectangle with various pen widths, colors and alpha values
· Rounded Rectangle- Draw a rounded rectangle with various pen widths, colors and alpha values
· Ellipse- Draw an ellipse with various pen widths, colors and alpha values
· Filled Rectangle- Draw a filled rectangle with various pen widths, colors and alpha values
· Filled Rounded Rectangle- Draw a filled rounded rectangle with various pen widths, colors and alpha values
· Filled Ellipse- Draw a filled ellipse with various pen widths, colors and alpha values
· Fill Foreground- Fill adjacent cells with foreground color
· Fill Background- Fill adjacent cells with background color

Enhanced Tools
In addition to basic canvas painting, a few additional tools are provided to enhance icons:
· Resize- resize's the image without stretching (the image is cropped)
· Resample- resample's the image to stretch within the images dimensions.
· Paint Alpha- Set alpha channel to selected alpha value
· Pick Alpha- Pick an alpha channel value from the icon
· Pick Color- Pick a foreground color from the icon
· Alpha & Color- Pick a background color and transparency from the icon
· Set Alpha- Set the alpha channel color with color dialog
· Make XP Icon- Convert to a 32-bit icon
· Soft Shadow- Add a soft shadow
· Inside Shadow- Add an inside shadow
· Gray Scale- Create a gray scale image
· Negative: Create a negative image

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker may be downloaded here:
http://www.vizacc.com/downloads/avhelp71443.exe
HelpMaker is an application to create help files without an expensive word- processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files.


Frames
Icons can have any number of frames or sub-icons stored in the icon file. Icon Editor show you how to open and save multi-frame icons, reposition the frames in the icon, import a frame from an existing icon, export a frame to a different file format, delete a frame and finally sort the icon frames based on image dimensions.

Frame Tools
Frames are sub-icons within one icon file. Frame tools located in the frame listview are used to move frame positions within the icon, import new frames. export a frame to a file, delete a frame and sort frames by icon dimensions.

Up Arrow- Moves selected frame up one level
Down Arrow- Moves selected frame down one level
Import- Add an existing icon to icon file as a frame from a file.
Export- Export an icon frame to a file
Delete- Delete selected icon frame from icon file.
Sort- Sort the icon frames by image dimensions

Note: The position of the frame in the icon file is saved when the icon file is saved.

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker may be downloaded here:
http://www.vizacc.com/downloads/avhelp71443.exe
HelpMaker is an application to create help files without an expensive word- processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files.


Zooming
The editor can be set so that the icon fits within the client area of the control or zoomed to the extent of the image (100 percent zoom) . A trackbar is also provided to adjust the level of the zoom.

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker may be downloaded here:
http://www.vizacc.com/downloads/avhelp71443.exe
HelpMaker is an application to create help files without an expensive word- processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files.


Special Code
The following methods may be useful in other ImageEn projects:

OrdCor
procedure OrdCor(var x1, y1, x2, y2: integer);
begin
if x1 > x2 then
   iswap(x1, x2);
if y1 > y2 then
   iswap(y1, y2);
end;

OrdCor gets a rectangle in x1, y1, x2, y2 and ordinates its coordinates, so that x1, y1 are on top-left and x2, y2 are on bottom-right.
Example, if you have:
OrdCor(100, 100, 5, 5);
Returns:
x1=5 y1=5 x2=100 y2=100

SetSquarePen
procedure SetSquarePen(Canvas: TCanvas; Color: TColor; Width: integer );
var
  LogBrush: TLOGBRUSH;
begin
  if Width > 1 then
  begin
    LogBrush.lbStyle := BS_Solid;
    LogBrush.lbColor := Color;
    LogBrush.lbHatch := 0;
    Canvas.Pen.Handle := ExtCreatePen ( PS_Geometric or PS_Solid or PS_ENDCAP_SQUARE, Width, LogBrush, 0, nil );
  end
  else
  begin
    Canvas.Pen.Color := Color;
    Canvas.Pen.Width := Width;
    Canvas.Pen.Style := psSolid;
  end;
end;

Set the pen to square as opposed to round (default). This is useful when the image is zoomed to hight levels.

SetGrayPal
procedure SetGrayPal ( hdc: integer );
var
  pe: array [ 0..255 ] of TRGBQuad;
  i: integer;
begin
  for i := 0 to 255 do
    with pe [ i ] do
    begin
      rgbRed := i;
      rgbGreen := i;
      rgbBlue := i;
      rgbReserved := 0;
    end;
  SetDibColorTable ( hdc, 0, 256, pe );
end;

Example
// if we need to draw on alphachannel using GDI (Canvas), then it must be ieTBitmap, pf8bit with GrayPal.
...
begin
  with ImageEnView do
  begin
    BX := XScr2Bmp ( X );
    BY := YScr2Bmp ( Y );
    startX := XScr2Bmp ( X );
    startY := YScr2Bmp ( Y );
    IEBitmap.Canvas.Pen.Width := UpDownPenWidth.Position;
    IEBitmap.AlphaChannel.Canvas.Pen.Width := UpDownPenWidth.Position;
    IEBitmap.AlphaChannel.Location := ieTBitmap;
    IEBitmap.AlphaChannel.PixelFormat := ie8g;
    IEBitmap.AlphaChannel.VclBitmap.PixelFormat := pf8bit;
    SetGrayPal ( IEBitmap.AlphaChannel.VclBitmap.Canvas.Handle );
  end;
end;

HtmlHelp

const
  HH_DISPLAY_TOPIC        = $0000;

function HtmlHelp(hwndCaller: THandle; pszFile: PChar; uCommand: cardinal;
dwData: longint): THandle; stdcall; external 'hhctrl.ocx' name 'HtmlHelpA';

procedure TMainForm.HelpExecute(Sender: TObject);
begin
  HtmlHelp ( GetDesktopWindow, 'plainiconeditor.chm', HH_DISPLAY_TOPIC, 0 );
end;

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker is an application to create help files without an expensive word- processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files. HelpMaker has no limitations, no time-outs, no nags, no adware, no banner ads and no spyware. It is 100% free. Other than this product, there is no free help authoring tool for WinHelp and HTML-Help.


Credits
The ImageEn Icon Editor demo was developed by Adirondack Software & Graphics with code enhancements provided for Windows GDI canvas drawing by HiComponents.

Additional imaging tools such as enhanced screen capture is available at
http://www.hicomponents.com\apprehend

Adirondack Software and Graphics is available for ImageEn consulting, or initial application development or problem solving on a fee basis. Adirondack Software and Graphics may be contacted by email at:
w2m@hicomponents.com

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker may be downloaded here:
http://www.vizacc.com/downloads/avhelp71443.exe
HelpMaker is an application to create help files without an expensive word- processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files.


License
 Previous Top
Icon Editor is an official demo program provided with source code so that developer may utilize the techniques within for their own application. The demo is licensed under the ImageEn licensing agreement.

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker may be downloaded here:
http://www.vizacc.com/downloads/avhelp71443.exe
HelpMaker is an application to create help files without an expensive word- processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files.


Icon Editor is an official demo program provided with source code so that developer may utilize the techniques within for their own application.  The demo is licensed under the ImageEn licensing agreement.

This help file was created with HelpMaker 7.1.442 by Vizacc Pte Ltd.
http://www.vizacc.com/
HelpMaker may be downloaded here:
http://www.vizacc.com/downloads/avhelp71443.exe

HelpMaker is an application to create help files without an expensive word-processor, without having the manage multiple files. Writing help files is called help authoring. You can make whole help files using HelpMaker. HelpMaker makes WinHelp, RTF and HTML-Help files.

HelpMaker has no limitations, no time-outs, no nags, no adware, no banner ads and no spyware. It is 100% free. Other than this product, there is no free help authoring tool for WinHelp and HTML-Help.