OS4 DepotLogo by Kicko 
(anonymous IP: 18.118.9.146,2194) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (343)
   o Datatype (51)
   o Demo (203)
   o Development (596)
   o Document (22)
   o Driver (97)
   o Emulation (147)
   o Game (1005)
   o Graphics (497)
   o Library (115)
   o Network (232)
   o Office (66)
   o Utility (924)
   o Video (69)

Total files: 4367

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 Readme for:  Library » Hollywood » hwp_iconic.lha

Hwp_Iconic

Description: Hollywood plugin for icon loader
Download: hwp_iconic.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 109kb
Version: 1.0
Date: 23 Jan 2022
Author: andreas@airsoftsoftwair.de (Andreas Falkenhahn)
Submitter: Samir Hawamdeh
Homepage: http://www.hollywood-mal.com/
Requirements: AmigaOS 4.x
Category: library/hollywood
License: Other
Distribute: yes
Min OS Version: 4.0
FileID: 11925
 
Comments: 0
Snapshots: 0
Videos: 0
Downloads: 65  (Current version)
65  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

Show comments Show snapshots Show videos Show content Show crashlogs Replace file 
Iconic
======

Iconic is the ultimate icon loader and saver plugin for Hollywood. It will make
all your icon dreams come true because it can load and save a large variety of
different icon formats. Currently, the following icon formats are supported by
Iconic:

- AmigaOS 1.x style icons
- AmigaOS 2.x/3.x style icons
- AmigaOS 3.5 icons (aka GlowIcons)
- AmigaOS 4.0 icons
- macOS icons (*.icns format)
- MagicWB icons
- MorphOS/PowerIcons icons (PNG)
- NewIcons 
- Windows icons (*.ico format)

Of course, Iconic also supports loading and saving of the metadata found in the
Amiga icon formats like tooltypes, icon position, drawer view mode, icon type
and so on. Thanks to Hollywood 9's new support for palette images it is also
possible to load the icon palette, set a transparent pen and access the raw
palette pens used in the icon image data. Of course, Iconic doesn't only support
palette-based icon images but also icons that contain true colour images with
alpha channel. Several of the icon formats listed above also support palette and
true colour images within the same icon file and several different icon sizes
within the same icon file. All of this is supported by Iconic as well making it
the ultimate icon loader and saver plugin for Hollywood.
  

Requirements
============

Iconic requires Hollywood 9.0 or better. It's also recommended to install the
JPEG 2000 plugin for Hollywood because the macOS icon format (*.icns) stores
some images in the JPEG 2000 format and Iconic will only be able to load them
if the JPEG 2000 plugin is available.


Loading icons
=============

To activate Iconic, simply add the following line at the top of your script:

    ()REQUIRE "iconic"
    
Then you can load and save icons using the functions from Hollywood's icon
library. Here's how to load and show an icon:

    LoadIcon(1, "Monkey_Island.info")
    ConvertToBrush(#ICON, 1, 1)
    DisplayBrush(1, #CENTER, #CENTER)        
 
Note that icons can contain images in multiple sizes and color resolutions. To
find out the number of images in an icon, just query the #ATTRNUMENTRIES
attribute. The following code iterates over all images in an icon and draws
them:

    LoadIcon(1, "explorer.ico")

    For Local k = 1 To GetAttribute(#ICON, 1, #ATTRNUMENTRIES)
        ConvertToBrush(#ICON, 1, 1, k)
        DisplayBrush(1, #CENTER, #CENTER)
        WaitLeftMouse
        Cls
    Next	

Furthermore, each icon entry can also have multiple frames. For example, Amiga
icons typically contain two frames: The first frame is shown when the icon is
not selected and the second frame is shown when it is selected. To get these
different icon states, you have to query the #ATTRNUMFRAMES attribute. Here's
how to extend the code from above to draw all icon entries and frames:

    LoadIcon(1, "Drawer.info")

    For Local k = 1 To GetAttribute(#ICON, 1, #ATTRNUMENTRIES)
        For Local j = 1 To GetAttribute(#ICON, 1, #ATTRNUMFRAMES, k)
            ConvertToBrush(#ICON, 1, 1, k, j - 1)
            DisplayBrush(1, #CENTER, #CENTER)
            WaitLeftMouse
            Cls
        Next	
    Next	

Amiga icons can also contain metadata stored as tooltypes. To get this data,
you can use the GetIconProperties() function:

    LoadIcon(1, "Hollywood.info")
    t = GetIconProperties(1)

    For Local k = 0 To ListItems(t.ToolTypes) - 1
       DebugPrint("Item:", k, "Key:", t.ToolTypes[k].key,
           "Value:", t.ToolTypes[k].value,
           "Enabled:", t.ToolTypes[k].enabled)
    Next

GetIconProperties() also allows you to read other metadata that is stored in
Amiga icons, like the icon type, its position on the Workbench, the size of the
drawer window if the icon is a drawer icon etc.
 
Finally, if Iconic is activated, you can also use icons in formats supported by
the plugin with the ()APPICON preprocessor command. Thus, with Iconic installed
you could also do something like this:

    ()APPICON "my_app.ico"
    
It's no longer necessary to use Hollywood's custom icon format or specify the
individual icon images manually. With Iconic you can simply pass an icon in one
of the common icon formats to ()APPICON.


Saving icons
============

Icons can be saved using the SaveIcon() function from Hollywood's icon library.
When Iconic is active, it will register the following new icon formats for use
with SaveIcon():

- #ICNFMT_AMIGAOS: classic AmigaOS icon
- #ICNFMT_AMIGAOS35: AmigaOS 3.5 icon (GlowIcon)
- #ICNFMT_AMIGAOS40: AmigaOS 4.0 icon
- #ICNFMT_MACOS: macOS icon (*.icns format)
- #ICNFMT_NEWICON: NewIcons icon
- #ICNFMT_PNG: MorphOS/PowerIcons icon in PNG format
- #ICNFMT_WINDOWS: Windows icon (*.ico format)

For example, to save icon 1 as a classic AmigaOS icon, you could use the
following code:

    SaveIcon(1, "test.info", #ICNFMT_AMIGAOS)

Note that all icon formats have their peculiarities. For example, classic
AmigaOS icons must be palette-based and the palette isn't stored in the icon
file. So if you try to save an icon that only contains 32-bit true colour image
data with alpha channel as a classic AmigaOS icon, Iconic will render the true
colour pixel data down to 4 colours using the Workbench 1.x palette when saving
the icon. This will probably lead to rather unsatisfying results, so for 
optimal results you should make sure that the icon you are about to save
contains the pixel data exactly in the format as expected by the respective icon
format. See the next chapter for an overview of pixel data formats supported by
the individual icon formats supported by Iconic.

Some icon formats also support compression of the image and palette data. If an
icon format supports compression, Iconic will compress the image and palette
data. If you want to turn this off, set the table tag "Compression" to FALSE
when you call SaveIcon(), e.g.

    SaveIcon(1, "test.info", #ICNFMT_AMIGAOS35, {Compression = False})

To modify the metadata that is supported by AmigaOS icons, use the function
SetIconProperties() from Hollywood's icon library. See the Hollywood manual for
details.


Icon format information
=======================

For reference, here is some information about the icon formats supported by
Iconic:

- AmigaOS 1.x style icons: This is a palette-based icon format which uses just
  a single image that should be in 4 colors. Note that the palette isn't stored
  in the icon itself but instead it is expected that the icon uses the standard
  Workbench 1.x colors.

- AmigaOS 2.x/3.x style icons: The same as AmigaOS 1.x style icons except that
  icons have two states now (normal and selected). Also, they support some
  additional metadata like tooltypes. Image data should be 4 colors and use the
  standard Workbench 2.x colors.
  
- AmigaOS 3.5 icons (aka GlowIcons): This is a palette-based icon format and
  in contrast to classic AmigaOS icons, the palette is stored inside the icon
  so that icons appear in the correct colors independent of the Workbench's
  palette. GlowIcons support a transparent pen, the maximum icon size is 256x256
  pixels and the maximum color depth is 8-bit, i.e. 256 colors. GlowIcons also
  contain a 4-color fallback icon that will be shown on Amiga systems that don't
  support GlowIcons. Icons have two different states (normal and selected). 
  Image and palette data can be stored with or without compression.
  
- AmigaOS 4.0 icons: This icon format is used on AmigaOS 4.x and supports true
  colour icons with alpha channel (32-bit). The maximum size is 256x256 pixels.
  AmigaOS 4.0 icons also contain a 4-color fallback icon that will be shown on
  classic Amiga systems that don't support AmigaOS 4.0 icons. Icon have two
  different states (normal and selected).

- macOS icons (*.icns format): Images inside the icon can't use arbitrary sizes
  like in the Amiga icon formats but can only use the following fixed pixel
  sizes: 16x16, 32x32, 48x48, 64x64, 128x128, 256x256, 512x512, 1024x1024. Sizes
  bigger than 128x128 pixels must only contain 32-bit alpha channel true colour
  images. Smaller sizes also support palette images but typically can contain
  32-bit true colour data as well. Image data can be stored with or without
  compression.
  
- MagicWB icons: These are like AmigaOS 2.x/3.x icons but use 8 colors and a
  special palette known as the MagicWB palette. Like with classic AmigaOS icons
  the palette isn't stored inside the icon file so Iconic will treat all icons
  that use 8 colors as MagicWB icons.

- MorphOS/PowerIcons icons (PNG): This is an Amiga icon format based on the PNG
  format. It is used on MorphOS and on classic systems using the PowerIcons
  patch. Image data can be of an arbitrary size and must use 32-bit true colour
  pixel data with alpha channel. Icons only contain one image and one state.
  
- NewIcons: This is a palette-based icon format and in contrast to classic
  AmigaOS icons, the palette is stored inside the icon so that icons appear in
  the correct colors independent of the Workbench's palette. NewIcons support a
  transparent pen, the maximum icon size is 93x93 pixels and the maximum color
  depth is 8-bit, i.e. 256 colors. NewIcons also contain a 4-color fallback icon
  that will be shown on Amiga systems that don't support NewIcons. Icons have
  two different states (normal and selected).
 
- Windows icons (*.ico format): Images inside the icon can be up to 256x256
  pixels. They can use image data that is palette-based or 32-bit true colour
  image data that contains an alpha channel. Image data can be stored with or
  without compression.
 

History
=======

Version 1.0:    (22-Jan-22)
- First release


Copyright
=========

This plugin was written by Andreas Falkenhahn <andreas()airsoftsoftwair.de>
See the COPYING file in this package for conditions concerning distribution
of this plugin. Visit http://www.hollywood-mal.com/ for more information
on Hollywood and more plugins.

File Version Size Date OS Dls Readme
hwp_ahx.lha1.3135kb30 Dec 20194.1227¤ Hwp_AHX - Hollywood plugin for Abyss' Highest eXperience
hwp_aiff.lha1.217kb06 Mar 20194.0147¤ Hwp_AIFF - Hollywood plugin for AIFF file format
hwp_apng.lha1.31Mb11 Dec 20234.023¤ Hwp_APNG - Hollywood plugin for APNG anims
hwp_avcodec.lha1.56Mb10 Oct 20224.089¤ Hwp_AVCodec - Hollywood plugin for AVCodec
hwp_digibooster.lha1.1114kb30 Jul 20154.0261¤ Hwp_DigiBooster - Hollywood plugin for DigiBooster
hwp_flicanim.lha1.227kb22 May 20234.048¤ Hwp_FLICAnim - Hollywood plugin for FLI/FLC anims
hwp_glgalore.lha1.13Mb12 Jan 20184.098¤ Hwp_GLGalore - Hollywood plugin for OpenGL
hwp_httpstreamer.lha1.174kb12 Jan 20184.0116¤ Hwp_HTTPStreamer - Hollywood plugin for video/audio streaming
hwp_hurl.lha2.04Mb30 Apr 20234.044¤ Hwp_hURL - The multi-protocol data transfer plugin
hwp_jpeg2000.lha1.2379kb22 May 20234.041¤ Hwp_JPEG2000 - Hollywood plugin for JPEG2000 images
hwp_malibu.lha1.4640kb13 Jan 20184.095¤ Hwp_Malibu - Run Scala presentations
hwp_moviesetter.lha1.257kb30 Jul 20154.0379¤ Hwp_MovieSetter - Hollywood plugin for MovieSetter anims
hwp_muiroyale.lha1.75Mb12 Jan 20184.0314¤ Hwp_muiroyale - Hollywood plugin for MUI GUIs
hwp_oggtheora.lha1.1920kb30 Jul 20154.0283¤ Hwp_OGGTheora - Hollywood plugin for Ogg Theora
hwp_oggvorbis.lha1.1709kb30 Jul 20154.0347¤ Hwp_OGGVorbis - Hollywood plugin for Ogg Vorbis
hwp_pangomonium.lha1.013Mb18 Mar 20244.019¤ hwp_pangomonium - Hollywood plugin for advanced text rendering
hwp_pcx.lha1.226kb22 May 20234.039¤ Hwp_PCX - Hollywood plugin for PCX file format
hwp_plananarama.lha2.2462kb11 Dec 20234.025¤ Hwp_Plananarama - Hollywood plugin for planar screen
hwp_polybios.lha1.322Mb08 Dec 20204.181¤ hwp_polybios - plugin for Hollywood to easily create PDF
hwp_rapagui.lha2.17Mb10 Oct 20224.089¤ Hwp_RapaGUI - Hollywood plugin for GUI creation
hwp_rebelsdl.lha1.15Mb01 Oct 20204.162¤ Rebel SDL - plugin for Hollywood that allows you use SDL
hwp_sid.lha1.0203kb06 Mar 20194.0101¤ HWP_Sid - This plugin allows Hollywood to load and play SID
hwp_sqlite3.lha1.2952kb12 Jan 20184.0209¤ Hwp_SQLite3 - Hollywood plugin for SQL databases
hwp_svgimage.lha1.34Mb06 Mar 20194.0224¤ Hwp_SVGImage - Hollywood plugin for loading SVG images
hwp_tiff.lha1.2808kb22 May 20234.041¤ Hwp_TIFF - Hollywood plugin for TIFF images
hwp_vectorgfx.lha1.21Mb06 Mar 20194.0220¤ Hwp_VectorGFX - Hollywood plugin for vectorgraphics
hwp_xad.lha1.062kb12 Jan 20184.0104¤ hwp_xad - Allow to open archives using the XAD system.
hwp_xlsx.lha1.01Mb05 Nov 20224.039¤ Hwp_XLSX - Hollywood plugin to create and edit XLSX documents
hwp_xmlparser.lha2.0387kb05 Dec 20224.051¤ Hwp_XMLParser - Hollywood plugin for parsing XML files
hwp_xmp.lha1.02Mb06 Apr 20204.081¤ HWP_XMP - Play many module formats with Hollywood
hwp_yafa.lha1.269kb22 May 20234.036¤ Hwp_YAFA - Hollywood plugin for YAFA anims
hwp_zip.lha2.0297kb10 Jul 20234.039¤ Hwp_Zip - Read and write zip archives for Hollywood
Copyright © 2004-2024 by Björn Hagström All Rights Reserved