Wanderer Icon Exchange

miker1264 · 17985

miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #60 on: December 19, 2021, 08:47:42 AM
cdimauro

It's all good. This is the rough code to get things working.I should also be mindful about tab spacing and indentation.

I also add constraints and error checking at the end. But it would be better to do much of that at the time of writing not at the end.

I usually go back and edit to make it look better and to make it more efficient. I should get in the habit of doing it right the first time though. It makes things easier at the end.   ;)

The application itself is doing what it is supposed to do. There were a few ways to go about replacing the icon images. I'm having some difficulty copying icon attributes such as default tool, icontype and tooltypes array from DiskObject to DiskObject.

I also have to implement Drag-n-Drop. The difficulty is that there are two Drop Zones so I have to set bounding boxes and compare drop coordinates. During experimentation it gets ugly! Many thanks to deadwood for offering some solutions. I'll probably need more help before it's finished though.  :)
« Last Edit: December 19, 2021, 09:47:59 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #61 on: December 19, 2021, 09:32:31 AM
For the IconClone app I could have simply tried to replace the images but then I would have to split the PNG Icons into two images to manipulate the data. But I would have to worry about preserving the icOn chunk data as well so I'm doing it differently.

Even if I used IconControlA to get the icon images I would still have to remake the icon file to infuse the new images and I would need to preserve the original icon attributes along with it. But the method I choose must work for PNG and IFF icon files.

I copy the source icon that has the proper images to a temp file in Ram Disk. I treat it as a complete file without splitting it. I must also consider the easiest way to deal with OS3.5 Icons. Treating them as complete files makes things much easier.

But then I must get two DiskObjects and copy all attributes from destination (original icon) to the temp icon. After the cloning process is complete I set filesize of destination icon to zero before writing binary to avoid extra IEND chunks when image sizes differ. I write temp icon directly to replace destination icon. The last part of the process is to delete the temp file and redisplay the new destination icon which now has new images.

Once everything is working correctly and after some cleanup I'll release the binaries and source code for everyone to enjoy.  ;)

I'm planning another small icon app called "IconColor" which also has double icon image displays.It will feature HSL Color Conversion to change icon color as @paolone says "on the fly".

The IconClone Application is contained in one code module so it can be easily compiled for AROS 68k or x86 or x86_64 as well.

« Last Edit: December 19, 2021, 11:41:37 AM by miker1264 »



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #62 on: December 19, 2021, 12:08:07 PM
thank you Miker :)



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #63 on: December 19, 2021, 01:01:49 PM
thank you Miker :)

There is another GUI based icon app I'm planning called "IconProcess" which is designed for Kens Icons. It allows batch processing large numbers of new colored icons from two baseimages, original images and icon image masks.

Within minutes using two colored baseimages and selecting directories for originals and image masks and output directory it's possible to produce thousands of new icons. See samples.

Of course I would get Kens permission before posting them.  :)

But it is possible to use IconProcess with any set of PNG Icons.It will also copy ToolTypes, etc to the new icons. I've also made a green glow border & neon blue glow border for icons.

The new colored icons can be used with colored window borders and background images to make colored themes.

A while ago @paolone asked about a way to replace the system icons with colored icons for Icaros Live DVD. The colored iconsets would either be zipped or in their own directory. So I will make another small GUI based app called "ReplaceIcons". It will be based on "Icon Alis" List Processing using an IconsList & NewIconsList. It will have an option to backup existing icons.
« Last Edit: December 19, 2021, 03:47:01 PM by miker1264 »



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #64 on: December 19, 2021, 05:13:46 PM
great!



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #65 on: December 20, 2021, 01:50:34 AM
It's nice when things work the way they are supposed to.

Copying icon attributes including icon type, default tool, stack size, and tooltypes array works now.

It's a few days away from a working version.



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #66 on: December 20, 2021, 03:18:54 AM
Indispensable tool for AROS 68k but especially for AROS x86 where there is nothing that can do this.

... By the way also AROS ABI-v1 does not support DualPNG icons, probably there will be the same problem with the png.datatypes


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #67 on: December 20, 2021, 09:31:21 AM
Indispensable tool for AROS 68k but especially for AROS x86 where there is nothing that can do this.

... By the way also AROS ABI-v1 does not support DualPNG icons, probably there will be the same problem with the png.datatypes

What about ABIv1 ? AROS 68k and AROS x86_64 are based on that. But you already know about PNG Datatype 42.1 vs 42.0

The current Nightly AROS 68k has an issue with PNG Datatype. But IcarosDesktop x86_64 is based on older files so it doesn't.
« Last Edit: December 20, 2021, 10:32:44 AM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #68 on: December 20, 2021, 11:13:41 AM

What about ABIv1 ? AROS 68k and AROS x86_64 are based on that. But you already know about PNG Datatype 42.1 vs 42.0

Yes indeed the problem is always the same, PNG Datatype that does not work well.

Quote
The current Nightly AROS 68k has an issue with PNG Datatype.
I tried the latest Nightly Build "20211220" and for the DualPNG icons you have to replace the PNG Datatype, then everything works fine

Quote
But IcarosDesktop x86_64 is based on older files so it doesn't.

I haven't tried IcarosDesktop x86_64, if it uses Dopus Magellan, it's likely that Dopus Magellan handles PNG icons, try Icaros deactivating Dopus and setting Wanderer !


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #69 on: December 20, 2021, 01:23:45 PM

What about ABIv1 ? AROS 68k and AROS x86_64 are based on that. But you already know about PNG Datatype 42.1 vs 42.0

Yes indeed the problem is always the same, PNG Datatype that does not work well.

Quote
The current Nightly AROS 68k has an issue with PNG Datatype.
I tried the latest Nightly Build "20211220" and for the DualPNG icons you have to replace the PNG Datatype, then everything works fine

Quote
But IcarosDesktop x86_64 is based on older files so it doesn't.

I haven't tried IcarosDesktop x86_64, if it uses Dopus Magellan, it's likely that Dopus Magellan handles PNG icons, try Icaros deactivating Dopus and setting Wanderer !

Or just check the version of PMG Datatype in MultiView.

Anyhow the issue will be resolved. deadwood is looking into it.




miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #70 on: December 21, 2021, 09:34:46 AM
Congratulations! AROS has a new Icon Exchange App.

I will make the release files today for all flavors of AROS.

« Last Edit: December 21, 2021, 09:42:04 AM by miker1264 »



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #71 on: December 21, 2021, 09:54:32 AM
Fantastic ! miker


Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #72 on: December 21, 2021, 10:08:11 AM
yes nice :)



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #73 on: December 21, 2021, 10:35:52 AM
Fantastic ! miker

It's nothing fancy! It's beautiful in it's simplicity.  ;)



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3740
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #74 on: December 21, 2021, 11:42:22 AM
Special because until today on AROS One x86 "Wanderer" you couldn't change the icons and you couldn't change the type of icons, AROS One 68k and AROS x86 don't use Dopus Magellan by choice :)