AROS Exec

Distros => Icaros Desktop => Topic started by: miker1264 on March 01, 2021, 09:15:00 PM

Title: Icon Alias
Post by: miker1264 on March 01, 2021, 09:15:00 PM
Work on Icon Alias using Icon Library continues.

Now I can put together the Compound String Arrays needed to display multiple alternate icons. Now that I'm working on making colored drawer icons using Batch Processing there will be many new IconSets to display to showcase Icon Alias.

I will use something like this:

struct ICON_LIST
{
    char *Cur_Icon_Name[100];
    char *Alt_Icon_Name[100];
} ;

Then it can store up to 100 Icon Names and Alternate Icon Names. So several alternate icons can be displayed at a time. Using this struct for compound string arrays I can assign string literals for each set of icons. Assignment of variables doesn't work with char *[ ] . But that's ok. It's just for testing & showing off nice new drawer icons.

Screenshots coming soon. But first I have to write the functions.  ;)
Title: Re: Icon Alias
Post by: miker1264 on March 01, 2021, 09:18:33 PM
Work on Icon Alias using Icon Library continues.

Now I can put together the Compound String Arrays needed to display multiple alternate icons. Now that I'm working on making colored drawer icons using Batch Processing there will be many new IconSets to display to showcase Icon Alias.

I will use something like this:

struct ICON_LIST
{
    char *Cur_Icon_Name[100];
    char *Alt_Icon_Name[100];
} ;

Then it can store up to 100 Icon Names and Alternate Icon Names. So several alternate icons can be displayed at a time.

Screenshots coming soon. But first I have to write the functions.  ;)
Title: Re: Icon Alias
Post by: AMIGASYSTEM on March 01, 2021, 10:08:32 PM
Thank you,  you are creating something really nice for AROS ;)
Title: Re: Icon Alias
Post by: miker1264 on March 01, 2021, 10:57:10 PM
Thank you,  you are creating something really nice for AROS ;)

And it's fun to play with graphics!  :)

It keeps me out of trouble mostly. But I still tell bad jokes.

I'm super excited about Batch Processing to Make Icons from Base Images. But I don't think anyone else realizes the implications. So many possibilities.

And I just discovered that it's possible to use neon blue or neon green glow borders for dramatic effect with certain colored icons. It's fun to find out what AROS can do with graphics.

I think charcoal black icons or medium red icons would look so nice with neon blue glow borders. And that's something we didn't have before.  8)
Title: Re: Icon Alias
Post by: AMIGASYSTEM on March 02, 2021, 12:49:35 AM
I'm discussing about your project with Peter Keunecke, author of the famous Icon.library OS3, he is a fan of icons and finds your project interesting, but he hasn't seen your screenshots yet, if you authorize me I can post them on EAB forum.
Title: Re: Icon Alias
Post by: miker1264 on March 02, 2021, 01:13:38 AM
I'm discussing about your project with Peter Keunecke, author of the famous Icon.library OS3, he is a fan of icons and finds your project interesting, but he hasn't seen your screenshots yet, if you authorize me I can post them on EAB forum.

Sure. No problem. Whatever screenshots I post can be redistributed freely.

With colored icons and Icon Alias I have in mind complete Themes with window borders, background image, and icons. I have one in mind now for the "Black and Blue" Theme. Picture a big black cat with blue eyes, blue window borders, and charcoal black icons with neon blue glow borders.  :)
Title: Re: Icon Alias
Post by: magorium on March 02, 2021, 01:16:30 AM
I'm super excited about Batch Processing to Make Icons from Base Images. But I don't think anyone else realizes the implications. So many possibilities.
oh. I do  though :)

I don't even think you realize to the fullest... Think big !  ;D

For example... what if you could supply those masks in a more uniform way/format (*) and you would add that functionality to for instance .., say .. a library. Then you could apply this kind of functionality on the fly when loading an icon.

* the only thing that isn't clear to me (because i lack time to investigate atm, so all my own wrongdoing), is it possible to programmaticly extract those masks from the original supplied icon image ? or is the used colour-scheme to close to the colours of the (background) drawer image ?
Title: Re: Icon Alias
Post by: miker1264 on March 02, 2021, 02:24:36 AM

magorium

The mask I refer to is a copy of the original image, either normal or selected. Each image with a graphic in it has a mask. It's just a region of white pixels (255,255,255) painted over a graphic or glow border or something we want to preserve so it doesn't change color.

The way the Copy_Mask function works is by comparing two byte arrays and copying into a third byte array. It compares an original image and it's mask image and copies the pixels under the mask to a selected byte array for the output image.

The way I set it up is Copy_Mask(...FALSE) copies pixels under the mask to the output byte buffer. But Copy_Mask(...TRUE) copies the white pixel mask itself to the output byte array, making a new mask image.

These functions would be nice to have in a library module or a cli app that can be used. There are many possibilities.
Title: Re: Icon Alias
Post by: magorium on March 02, 2021, 04:59:49 AM
miker,

Yes, i did grasp your explanation  :)

Unfortunately that was not what i meant to say/ask. .. sorry for that, let me try rephrase

Back in the day when you required a mask when using the blitter, and taking into account that we were quite lazy back in those days, we created our mask-bitmaps by checking individual pixels in the image and identifying which pixel belonged to the graphical image, and which pixel is/was part of the 'background'.

This can be a fully automated process, as long as you know which pixel belongs to what part of the image.

Now, doing that with 24-bit color-pixels with alpha channel can be a bit daunting but the process is similar. You only have to know which pixel(colours) belong to the background and which ones to the image (or you can do/combine that using pixel coordinates that belong to the overlay area in case it is consistent). That way you do not have to manually create the mask for the overlay image (your whitespace). Similar can be done for the 'glow' area. If the position of the glow is consistent then you can automate that process as well.

I ask, because as i can imagine, the creation of the mask must have taken away much of your time and is most probably a process that you do not wish to repeat (very) often.

That is why the original designer of those icons has a much easier job. (s)he has one drawer background and design the individual overlay-images. Then launches a macro or script to put all designed overlay images on top of the drawer icon. If you use modern tools like gimp or even TAD on native Amiga then creating such a bunch of icons is a peace of cake (not including designing the overlay images though, that is an art form in itself  :) ).

edit: I recalled another trick from back in the day: When using planar image data, sometimes an overlay was just using 2 or 3 upper/lower planes and the background used the other planes. That way you only had to watch carefully with providing the correct colour information for the combined planar pixels. You could do some nice tricks at runtime with that as well ... especially when playing with the copper.
Title: Re: Icon Alias
Post by: miker1264 on March 02, 2021, 06:03:52 AM
magorium

Ah. I understand now what you meant earlier.

It would be easy to automate making the overlay masks because we simply compare it to the Base Image of the Default Drawer. If what is in the image with a graphic is NOT the same as the Base then it's a graphic so make it white! Definitely a good idea. Now I need to add a new menu item: "Make Masks".

I may need to go back and do some small post processing cosmetics but it's better than the manual method. Why didn't I think of that brilliant idea!?  ;)

I am using a similar method as what you described for Batch Processing. I used Colored Base Images and Copy the Graphic Elements from the Originals. I just made these black icons using that method. Because the Base Image had a blue glow border, then all images have a blue border. That's also a good idea.

But then Icon Alias is the means by which we can display new icons in non-permanent way.

Title: Re: Icon Alias
Post by: miker1264 on March 02, 2021, 06:06:20 AM
Here is the backgroung image I intend to use for the Blue and Black Theme to showcase Icon Alias, and the new Black Icons.

It reminds me of the AROS Boot Screen...
Title: Re: Icon Alias
Post by: miker1264 on March 02, 2021, 06:18:56 AM
And finally, here are the sample of Black Icons for you to play with.

Some of them need a little cosmetic repair. The mask wasn't good.
Title: Re: Icon Alias
Post by: magorium on March 02, 2021, 06:34:34 AM
It would be easy to automate making the overlay masks because we simply compare it to the Base Image of the Default Drawer. If what is in the image with a graphic is NOT the same as the Base then it's a graphic so make it white! Definitely a good idea. Now I need to add a new menu item: "Make Masks".
Aha. Yes, in case you have an empty drawer image without overlay then this is even much easier to accomplish exactly as you wrote. Now you have the better idea there  :)

Quote
But then Icon Alias is the means by which we can display new icons in non-permanent way.
Indeed, and at the same time, thanks to your color-schemes it could be integrated (much later ofc and not in particular addressed at you) in a theme, that matches the rest of the desktop settings. E.g. a winter or autumn theme with matching icons, or what about icons that glow more (or become more dark) when the time reaches sundown.

Eat that windows wallpaper-seasons-changer  :P

Graphics are such a playful topic to fool around with  ;D
Title: Re: Icon Alias
Post by: magorium on March 02, 2021, 06:37:16 AM
Here is the backgroung image I intend to use for the Blue and Black Theme to showcase Icon Alias, and the new Black Icons.
that would be awesome if you are able to pull that off, because...


Quote
It reminds me of the AROS Boot Screen...
.. that image looks amazing, and indeed reminds me of kitty-boot-eyes-looking-for-something-yummie-to-eat as well.
Title: Re: Icon Alias
Post by: AMIGASYSTEM on March 02, 2021, 08:24:08 AM
Sure. No problem. Whatever screenshots I post can be redistributed freely.
Thanks

Quote
With colored icons and Icon Alias I have in mind complete Themes with window borders, background image, and icons. I have one in mind now for the "Black and Blue" Theme. Picture a big black cat with blue eyes, blue window borders, and charcoal black icons with neon blue glow borders.  :)
Yes beautiful "Black and Blue" even if for my old eyes they create glare, I on my AfA One had created 2 Themi, the icons created by me the existing windows on AfA OS, I attach screenshot:

Title: Re: Icon Alias
Post by: AMIGASYSTEM on March 02, 2021, 08:25:51 AM
This other theme
Title: Re: Icon Alias
Post by: miker1264 on March 02, 2021, 03:30:38 PM
This other theme

Very nice! Do the icons have neon blue glow borders for the Blue and Black Theme? I see blue tabs on the icons.  :)
Title: Re: Icon Alias
Post by: AMIGASYSTEM on March 02, 2021, 04:19:36 PM
I am not a graphic designer but with a simple graphic program and IconEditor you can create beautiful icons, if you are interested this is my procedure, see video tutorial:

https://drive.google.com/file/d/1IqEakOodpnDOuFS060xRt_rx3_Gx4Ri5/view
Title: Re: Icon Alias
Post by: miker1264 on March 02, 2021, 11:17:48 PM
I accepted the challenge by magorium to automate making mask templates then analyzed the results. There are issues.

The author used a base image different than the default drawer. So I can extrapolate back to that original base image. But a big problem remains. It was not a direct rgb composite. Instead, it was a compositing using alpha blending which complicates it. So I would have to find out how to remove the alpha blending to only consider rgb values that are significantly different than the base image.

I believe I can convert to hsl and use a method I would call "hsl subtraction" by which I only consider hue and saturation. And I give it an acceptable range of h+-2 and s+-2. That forces the pixel value to be significantly different to be considered. If we exclude 32bit pixels with alpha less than 255 that excludes the glow border and alpha mask.

Whew! That involves a lot of work but it could save a lot of time.

Update : The results are in but the conclusion isn't satisfactory. Although it would be nice to automate the mask making process it isn't feasible because of alpha blending. So it seems there is no substitute for the human eye when it comes to making mask templates.  :)



Title: Re: Icon Alias
Post by: miker1264 on March 05, 2021, 05:16:19 PM
Changing the Glow Border Tint works now. I wonder if that is something that can be added to a library function.

I wrote a new function for Icon Library: GetIconAliasName to display Alternate Icons. I'll test it later today.

Now I need to make more colored icons. Maybe I'll start with the "Blue And Black" Theme I mentioned earlier. That's the first of several. I have more Icon Themes in mind such as "Christmas Theme" with red and Green. :)
Title: Re: Icon Alias
Post by: magorium on March 06, 2021, 04:20:30 PM
I accepted the challenge by magorium to automate making mask templates then analyzed the results. There are issues.
Uhm... it was not my intention to put you to work, just an idea.



Quote
Whew! That involves a lot of work but it could save a lot of time.
It indeed can save a lot of time....

Quote
Update : The results are in but the conclusion isn't satisfactory. Although it would be nice to automate the mask making process it isn't feasible because of alpha blending. So it seems there is no substitute for the human eye when it comes to making mask templates.  :)
.. that is why it is very unfortunate that you could not get it to work with the glow-icons you are currently working with.


In that case i am very sorry to have put you up to this. I could have prevented that by analysing the icons with some professional picture editing software.


It does make me wonder though.. the original author does not have time to spent to do all this manually, so (s)he must have been using a drawing tool (border-lasso or something similar) in order to determine the border for glow-area and then apply the glow-pattern. So that should at least give/provide a recurring glow-pattern. At least that is how i understand for these kind of things to work (so i might be totally off there as well)


Thank you for making the effort and reporting on your findings miker :thumbsup: (sorry for my delayed response)
Title: Re: Icon Alias
Post by: miker1264 on March 07, 2021, 01:54:04 AM
Actually hand painting a mask for each icon image only takes a minute or two. And it's more accurate than using just software.

I can easily select the glow border using hsl. That's how I change the tint to blue by using HSL Color Rotation. But it's more like Hue Rotation because Saturation and Luminance remain the same. Only the Hue changes. To tint the yellow glow border blue it gets a new rotation of 145 degrees which gets added to each pixel of the original glow border. The result is neon Blue! I like it.