AROS Graphics Operations

miker1264 · 971

miker1264

  • Legendary Member
  • *****
    • Posts: 670
    • Karma: +26/-2
Reply #15 on: February 19, 2021, 02:25:38 PM
miker1264 it would be useful and exceptional if in system startup you could change the color of all the icons of the system, in order to adapt them to the theme :)

That's what Icon Alias does.  :)



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 526
    • Karma: +26/-1
Reply #16 on: February 19, 2021, 03:38:21 PM
If I understand well we will have a tool that never existed in the world AMIGA and AMiGA NG  ;)


miker1264

  • Legendary Member
  • *****
    • Posts: 670
    • Karma: +26/-2
Reply #17 on: February 19, 2021, 03:57:58 PM
If I understand well we will have a tool that never existed in the world AMIGA and AMiGA NG  ;)

Kalamatee came up with the concept of Icon Alias so he deserves credit for that. I have been experimenting with it in Icon Library and I'm very excited about the possibilities.  :)

In the last few days I introduced AROS to HSL Color Rotation. That's another thing Amiga didn't have. But it works well so far. Color Quantizing using the Wu Algorithm is something else Amiga didn't have. It didn't need it when everything was 8 bitplanes or less. The color reduction techniques found in mamy Amiga programs are inefficient.
« Last Edit: February 19, 2021, 04:17:28 PM by miker1264 »



AMIGASYSTEM

  • Legendary Member
  • *****
    • Posts: 526
    • Karma: +26/-1
Reply #18 on: February 19, 2021, 05:50:54 PM
Thanks miker, I'll gladly try these apps with the new AROS One icons


miker1264

  • Legendary Member
  • *****
    • Posts: 670
    • Karma: +26/-2
Reply #19 on: February 22, 2021, 09:21:18 PM
For the IconEdit program I'm working on, I had a dilemma as far as the graphics.

The legacy icon support is based on modifyicon. It uses classic methods to read the icon data and it uses Graphics Library to draw the background and images which is a very slow method.

So in order to add support for png icons and argb data chunks from hybrid icons I needed a new method. First I tried using Icon Library functions to load png images but there were problems.

I needed a unified display method for legacy and for png icons. While messing with code from Icon Library I found ReadMemPNG and LoadIconPNG that had a method to find offsets for both images...then I had an idea.

Use datatype objects for ndto (normal) and sdto (selected). That works for glow icons and png icons. I'm already using datatypes to save images and getting a bitmap to display is then easier.

I can use the offsets to read data into a byte array then set up a datatype for both images to copy the data into.

I think that's an elegant solution to use picture datatypes! 😊



miker1264

  • Legendary Member
  • *****
    • Posts: 670
    • Karma: +26/-2
Reply #20 on: February 24, 2021, 05:16:36 AM
Here is a design concept for the HSL Color Rotate User Interface. On the left is Before and on the right is After. It's designed for simplicity but also to allow a preview of the color transformation before applying the color rotation. There will still be one last chance in the main program to change your mind before saving the new colorful icon.  :)



paolone

  • Senior Member
  • ****
    • Posts: 451
    • Karma: +14/-0
Reply #21 on: February 24, 2021, 10:27:41 AM
Miker, that's amazing.


Will be there a cli interface for it, so i can replicate the same color rotation to all icon files with a command within a script?


miker1264

  • Legendary Member
  • *****
    • Posts: 670
    • Karma: +26/-2
Reply #22 on: February 24, 2021, 03:02:58 PM
Miker, that's amazing.


Will be there a cli interface for it, so i can replicate the same color rotation to all icon files with a command within a script?

That would be a nice feature. That is possible.  :)

As a novelty or for your own satisfaction using cli for hsl color rotation or any color transformation is possible but it only works with default drawer icons. Any drawer icons with small graphic attached require a mask.Much like assembling IcarosDesktop assembling colored icons involves much manual effort.

There is a better way using pre-made sets of colored drawer icons in an iconset directory. Simply use a cli icon exchange utility to replace the original icon with the corresponding alternate colored icon. Do that in sequence for each drawer.


I can work with you on the procedure. Do you like the new colored icons? I'm assembling complete sets of colored drawer icons in several ice cream flavors. No more "plain vanilla" Icaros icons! Now we have more colors.  8)
« Last Edit: February 24, 2021, 04:33:16 PM by miker1264 »



paolone

  • Senior Member
  • ****
    • Posts: 451
    • Karma: +14/-0
Reply #23 on: February 24, 2021, 06:23:26 PM
Miker, that's amazing.


Will be there a cli interface for it, so i can replicate the same color rotation to all icon files with a command within a script?

That would be a nice feature. That is possible.  :)

As a novelty or for your own satisfaction using cli for hsl color rotation or any color transformation is possible but it only works with default drawer icons. Any drawer icons with small graphic attached require a mask.Much like assembling IcarosDesktop assembling colored icons involves much manual effort.

There is a better way using pre-made sets of colored drawer icons in an iconset directory. Simply use a cli icon exchange utility to replace the original icon with the corresponding alternate colored icon. Do that in sequence for each drawer.


I can work with you on the procedure. Do you like the new colored icons? I'm assembling complete sets of colored drawer icons in several ice cream flavors. No more "plain vanilla" Icaros icons! Now we have more colors.  8)


yes, I really like 'em!


miker1264

  • Legendary Member
  • *****
    • Posts: 670
    • Karma: +26/-2
Reply #24 on: February 24, 2021, 07:44:00 PM
Here are some more and a sneek peek at the processing involved.

As a test for my copy mask function in ShowPicture I selected three sets of colored drawer icons. The beauty of copy mask is that I can use the base drawer images for each color as the start point and simply make mask templates and copy the small graphic for each icon image.

Here's how it works. From the original MyWorkspace Icon I split the icon into two images, MyWorkspace 1.png and MyWorkspace 2.png. I then paint a white pixel mask for each of the two images. You can see the mask templates, the original images and the three sets of base colored images in the screenshot.

I copy the MyWorkspace 1_mask.png to Ram Disk: and rename it "mask.png". Then I open the original MyWorkspace 1.png for comparison. From the Masking Menu I select Copy Mask and a file requester asks for a destination image. Select any of the first images from blue, green or brown sets. Applying the mask is automatic and the pictures changes to the new colored image.

Then we can save the newly processed image and move to the next colored base image using the same mask. The process is the same for the second image in each set. We start by loading the mask and the original then select destination. Using the master templates for each icon make processing faster but it's very repetitive and tedious work. "Some assembly required".

The programming involved uses three sets of byte arrays. It looks at each pixel in the mask. Is it White? If so, compare to the original pixel. If it is also White, skip it and go to the next pixel. It's just a White Pixel. But if the original is NOT White, copy the original pixel to the destination byte array for the image we selected with the file selector from available colored icons. The resulting image is beautiful as you can see.

Now you can see the resulting Colored MyWorkspace images ready for Icon Assembly.  :)
« Last Edit: February 24, 2021, 07:54:49 PM by miker1264 »



paolone

  • Senior Member
  • ****
    • Posts: 451
    • Karma: +14/-0
Reply #25 on: February 24, 2021, 10:12:32 PM
wow!


miker1264

  • Legendary Member
  • *****
    • Posts: 670
    • Karma: +26/-2
Reply #26 on: February 24, 2021, 10:40:47 PM
Wow! Yes. It's an involved process to make beautiful icons!

I will process each drawer separately because there are many drawer icons in each. First I will make new colored icons for "System" then other drawers will follow. In System there are about 14 or so drawer icons. It seems easy enough, right?

First part of the process is to split the icons. I spent about 2 hours last night splitting them into png files. I need a batch process for that. Today I spent about an hour making 28 mask templates, one for each image. It should take another hour to make the new colored icons from the mask templates. But the master templates can be re-used to make unlimited colored drawer icons, in theory. Splitting the icons and making mask templates is the most time consuming part of the process.

IconInject is supposed to be an icon exchange utility but for some reason it doesn't work on 64bit. I'll try it on 32bit. If it doesn't work I can make another little utility. It really only needs to do some fancy juggling. Split the source and dest icons into images and export the "icOn" chunk and copy it to the source, then re-assemble and rename the images into a new icon.  ;)

No worries! It all makes sense to me in a mathematical and procedural way. The author of the original set, Mr Ken, probably used Alpha Image Compositing with Alpha Blending. Nice!  :)

Here is attached the Copy_Mask Function that makes beautiful icon images if anyone is interested.

Once I write a new function for Icon Alias in Icon Library to display a drawer full of alternate icons from an IconList then I can demonstrate what IcarosDesktop looks like with new icons.
« Last Edit: February 25, 2021, 02:04:12 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 670
    • Karma: +26/-2
Reply #27 on: March 01, 2021, 04:17:22 PM
There is a saying "necessity is the mother of invention".

So now we have a working Batch Process for making Colored Drawer Icons. It's a beautiful thing!  :)

But sometimes inventions happen by accident, or at least their use was not intended.

Recently I made several sets of Colored Drawer Base Images which are for drawer1 and drawer2. I didn't use mask templates so even the glow border was transformed during HSL Color Rotation.

Using the New Batch Processing I made a set of icon images and icons. When I processed the Orange Icons I found something interesting and possibly very useful.

I noticed I had forgotten to fix the Glow Border. In every icon it was a very pleasant Neon Blue! What a dramatic effect.

Blue on blue, green on green, or yellow on yellow or even brown wouldn't be dramatic. But what about Neon Blue or Neon Green Glow Borders with Charcoal Black Icons? Or Red Icons with Neon Blue Borders? I only need change the border on one Base Image (drawer2.png) then all resulting icons have blue borders.

Custom Neon Glow Borders with Your New Colored Icons??

« Last Edit: March 01, 2021, 05:05:08 PM by miker1264 »