==================================
ICO Viewer Example Project
==================================
Author: Dreystone Software
Requirements: REALbasic 2005r3 or higher
Project description page:
http://developer.dreystone.com/icoviewer.php
REALbasic Sample Project:
http://developer.dreystone.com/files/icoviewer.rbp.zip
Compiled Macintosh Application (PEF):
http://developer.dreystone.com/files/icoviewer.dmg.zip (1.2 MB)
Compiled Windows Executable:
http://developer.dreystone.com/files/icoviewer.exe.zip (1.1 MB)
Introduction:
The ICO Viewer is partly an example project, partly a useful utility,
and partly a set of classes which you can use in your own projects.
Because it is useful as an utility, there are also compiled
executables in addition to the REALbasic source code.
ICO Viewer Utility:
This application was only created to test the ICO file format parsing
algorithm, but it turns out to be useful as a utility as well. To use
the utility you can either enter in a web address pointing to an ICO
file (usually a favicon.ico file) and the utility will parse the
images and display them in the window. You can also open an ICO file
using the standard open dialog or by dragging in an ICO to either the
listbox or the display area.
If you use an internet address, a basic error code will display if
the website or file cannot be located. If no error occurs, but the
file is not validated as an ICO file, then no items will be displayed.
What makes this utility useful is the ability to see all sizes and
bit-depths of a particular icon. In addition, compliments to PNG
Utilities plugin ("http://developer.chaoticbox.com/"), this utility
allows you to export one or all of the icons as transparent PNG images.
The ICO Viewer utility allows you to view nearly any valid ICO file,
including files created with unusual icon sizes (such as 48x64) and
including icons up to 256 x 256 pixels in size such as are used in
the upcoming Windows Vista operation system. The only ICO type not
supported is if the element uses PNG compression, and unreadable/
corrupt elements will be ignored.
Source Code:
The entire ICO Viewer project is available as open source with the
exception of the IconSet and IconElement classes which are encrypted
(see below for more information). You are free to modify the project
source code and redistribute the ICO Viewer application as long as it
is Freeware (no shareware or commercial redistribution).
As written, this project does require the PNG Utilities plugin, but
is only used for exporting the icons as PNG images. If you do not
wish to load the plugin, you can disable the two lines of code which
call PNGu.
This project also makes use of the BufferedCanvas class ("http://
developer.dreystone.com/bufferedcanvas.php") to provide double-
buffering for Macintosh OS 9 and Windows versions.
IconSet and IconElement classes:
These classes are entirely written in REALbasic and so are cross-
platform compatible. Effort has been made to support all ICO files
encountered with the exception of PNG-compressed icons which can
occasionally be found in the new Windows Vista 256x256 icon
elements. If you encounter an ICO file which these classes are not
compatible or are incorrectly interpreted, please notify us so that
we can make the necessary modifications and update the project.
IconSet is a class which contains all elements in an ICO file. You
can create an IconSet by passing the constructor a String with ICO
data (such as from a socket) or by passing an ICO FolderItem. The
IconElement class is primarily a container object holding a single
icon and color map (if Depth <= 8).
The public accessible methods and properties of the IconSet and
IconElement are available at the project description page:
http://developer.dreystone.com/icoviewer.php
Conditions of Use:
The ICO Viewer project is free and you are free to use it with some
restrictions -- you cannot redistribute the ICO Viewer application
for profit. You are permitted to use the IconSet and IconElement
classes in any project (freeware or commercial) but the encrypted
classes are provided on an "as is" basis. If you have code
improvements or bugs to report, please submit them to
[EMAIL PROTECTED] so that the entire REALbasic community can
benefit.
The ICO Viewer project is written and maintained by Dreystone Software.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>