IconClone Icon Exchange

miker1264 · 12631

aha

  • Junior Member
  • **
    • Posts: 66
    • Karma: +41/-0
Reply #135 on: February 14, 2023, 01:23:07 PM
@miker

I‘m looking forward to it. Thank you very much!



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3744
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #136 on: February 16, 2023, 05:30:44 AM
miker, I came across some icons that I can't convert, as soon as I drag the icon a Shell "CON" appears.

They seem to be Glow Icons, on OS3.9 the conversion works fine.

I attach screenshot error, and the two Icons I tried to convert:



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #137 on: February 16, 2023, 09:57:35 AM
miker, I came across some icons that I can't convert, as soon as I drag the icon a Shell "CON" appears.

They seem to be Glow Icons, on OS3.9 the conversion works fine.

I attach screenshot error, and the two Icons I tried to convert:

Thanks. I will test the sample icons. I noticed the LunaPaint icon won't display with drag-n-drop but it works with file requesters (? Buttons). I will check that out as well.

It all helps IconClone to become a better icon application.

I'm still testing but I don't see anything peculiar about the icons themselves. Maybe there is something wrong with the loading & displaying functions . Not sure yet

Both of your test icons have signature 'E310' so they are Classic Amiga Icons with OS35 IFF Extension with two IMAG chunks. So in theory they should load & display. The LunaPaint icon is a single PNG icon. So it should load ok.

After investigating I find that there is an error with the filename with drag-n-drop for Templates.info. But when you use the '?' file requester it loads just fine. The other icon "TesterDecks.info" loads & displays at the command line & with drag-n-drop. No problems with that one.

I will try to reproduce the CON window error. I'll fix that.

« Last Edit: February 16, 2023, 01:07:11 PM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #138 on: February 16, 2023, 05:55:44 PM
miker, I came across some icons that I can't convert, as soon as I drag the icon a Shell "CON" appears.

They seem to be Glow Icons, on OS3.9 the conversion works fine.

I attach screenshot error, and the two Icons I tried to convert:

The other icons work correctly on Magellan.

But there's something wrong with Templates.info

That icon seems corrupted. If you remake that icon with the same images it may work.



magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #139 on: February 16, 2023, 09:23:34 PM
But there's something wrong with Templates.info

That icon seems corrupted. If you remake that icon with the same images it may work.
Perhaps the following output is able to help you (further) analyze the issue:
Code: [Select]
./ii dumpstructs info Templates.info
-------------------------------
           Parse Icons
-------------------------------
Path    = ""
Pattern = "Templates.info"
-------------------------------


opened stream for /media/ram/test/Templates.info
Read classic AOS Icon file ...
Trying to read struct DiskObject from offset $00000000
sizeof(self) = 78 sizeof(TStructDiskObject) = 78
Trying to read struct DrawerData from offset $0000004E
SizeOf OldDrawerData = 56
Trying to read struct Image (1) from offset $00000086
skipping 516 bytes plane-data
Trying to read struct Image (2) from offset $0000029E
skipping 552 bytes plane-data
done reading 1.0 icon
OS v2.x icon extension expected
detected data after classic AMIGA icon structures, most probably a OS 3.5 icon
exact match for OS 3.5 icon
closed stream


DiskObject:
do_Magic          : $E310
do_Version        : $0001
do_Gadget...     
.ga_NextGadget    : $00000000
.ga_LeftEdge      : 81
.ga_TopEdge       : 21
.ga_Width         : 46
.ga_Height        : 46
.ga_Flags         : $0006
.ga_Activation    : $0001
.ga_GadgetType    : 1
.ga_GadgetRender  : $ABADCAFE (See image1)
.ga_SelectRender  : $ABADCAFE (See image2)
.ga_GadgetText    : $00000000
.ga_MutualExclude : 0
.ga_SpecialInfo   : $00000000
.ga_GadgetID      : $0000
.ga_UserData      : $00000001
do_Type           : 2
do_Pad            : $00
do_DefaultTool    : $00000000
do_ToolTypes      : $00000000
do_CurrentX       : 77
do_CurrentY       : 10
do_DrawerData     : $ABADCAFE
do_ToolWindow     : $00000000
do_StackSize      : 4096

DrawerData:
dd_NewWindow... 
.nw_LeftEdge      : 381
.nw_TopEdge       : 291
.nw_Width         : 444
.nw_Height        : 217
.nw_DetailPen     : 255
.nw_BlockPen      : 255
.nw_IDCMPFlags    : $00000000
.nw_Flags         : $0200127F
.nw_Firstgadget   : $00000000
.nw_CheckMark     : $00000000
.nw_Title         : $00000000
.nw_Screen        : $00000000
.nw_BitMap        : $00000000
.nw_MinWidth      : 94
.nw_MinHeight     : 65
.nw_MaxWidth      : 65535
.nw_MaxHeight     : 65535
.nw_Type          : 1
dd_CurrentX       : -23
dd_CurrentY       : -369098753
dd_Flags          : $00000000
dd_ViewModes      : $0000

Image1:
im_LeftEdge       : 0
im_TopEdge        : 0
im_Width          : 44
im_Height         : 43
im_Depth          : 2
im_ImageData      : $ABADCAFE
im_PlanePick      : 3
im_PlaneOnOff     : 0
im_NextImage      : $00000000

Image2:
im_LeftEdge       : 0
im_TopEdge        : 0
im_Width          : 46
im_Height         : 46
im_Depth          : 2
im_ImageData      : $ABADCAFE
im_PlanePick      : 3
im_PlaneOnOff     : 0
im_NextImage      : $00000000

-------------------------------
           Statistics
-------------------------------

processed 1 files in 0.00 seconds

invalid :    0
valid   :    1
--------------- +
total   =    1

Unknown Format  :    0
OS v1.x Format  :    0
OS v2.x Format  :    0
OS v3.5 Format  :    1
NewIcon Format  :    0
PNG Format      :    0

Undefined icons :    0
Disk icons      :    0
Tool icons      :    0
Drawer icons    :    1
Project icons   :    0
Other           :    0


AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3744
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #140 on: February 17, 2023, 01:46:41 AM

That icon seems corrupted. If you remake that icon with the same images it may work.


Yes it may be that they are damaged, strange though that with Workbench OS 3.9 you can replace them, in any case I don't use those Icons , the Glow Icons are not quality, they have bad glow and the images are poor.

On AROS One I replace all program Icons, I have already created the new DualPNG icons instead of those icons.


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #141 on: February 17, 2023, 01:56:50 AM
@magorium

Nice icon output data.

How did you get that icon information?

Which tool did you use?



paolone

  • Moderator
  • Legendary Member
  • *****
    • Posts: 568
    • Karma: +90/-0
Reply #142 on: February 17, 2023, 02:08:13 AM
@magorium

Nice icon output data.

How did you get that icon information?

Which tool did you use?


It appears to be ii, either a linux or a sh tool. I don't know anymore about it.


magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #143 on: February 17, 2023, 06:22:46 AM
@magorium

Nice icon output data.

How did you get that icon information?

Which tool did you use?
It appears to be ii, either a linux or a sh tool. I don't know anymore about it.
:)

No idea if I told already but it is my own (experimental, continuously under construction) cross-platform amiga-icon tool (ii stands for current working title: icon info).  It is actually seem to have become a never ending story for more than 12 years now  (although the source-code does not seem to account for that) :P

It is a tool that analyzes the icon structure, detects its format and dumps relevant information to the command line.

You are free to contact me if you want to have a peek at the code, it is written in Pascal though. I can provide an executable on request (provided I am able to cross-compile for the chosen target).

Unfortunately the todo list for ii is still humongous so i have never had the opportunity to do a proper release. Currently the parameter handling and implementation for the different listing modes is driving me bunkers as I never seem to be able to make up my mind. So it's a bit flaky).
« Last Edit: February 17, 2023, 07:03:11 AM by magorium »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #144 on: February 17, 2023, 09:23:48 AM
@magorium

That's a useful little icon utility.  :)

The problem with Templates.info is what I call the icon attribute tag values such as for first image, second image, etc. AROS icon library uses ABADCAFE. Ilbmtoicon uses a numeric value. But this icon file uses an unusual value.

It can still be evaluated correctly using the rule - if it is equal to 0 then it is 0. If it is not then it's 1. And 1 means the data is present. The solution is to remake the icon file with the correct icon attribute tag values.

The problem that IconClone has with this icon is when we drag-n-drop it, the system for whatever unknown reason insists that there is a .info in the filename which is incorrect. For the appwindow there are three cases. If it's a directory the last char will be /. If it's a volume the last char is : and if it's a file it will be filename without .info extension.

IconClone as far as error handling can pick up the dot in filename which for drag-n-drop indicates "bad filename '.

But even this icon file can be displayed using the file requesters buttons '?' in the middle. Remake the icon like this. Create a new drawer with icon. Drop that in Dest display area on the right. Use Srce file requester to load Templates.info. Do the icon image exchange. In Magellan reopen the drawer or volume to display the new images.

Now the new drawer icon has icon attribute tags values ABADCAFE. We can drag-n-drop in IconClone as usual.





magorium

  • Legendary Member
  • *****
    • Posts: 632
    • Karma: +62/-0
  • Convicted non contributor
Reply #145 on: February 17, 2023, 10:35:45 AM
@magorium

That's a useful little icon utility.  :)
If interested then simply request a platform and i'll see what i can do (in which case it will not be an official release though and would be meant for internal usage only as the tool is not finished yet). For source-code feel free to pm me.

Quote
The problem with Templates.info is what I call the icon attribute tag values such as for first image, second image, etc. AROS icon library uses ABADCAFE. Ilbmtoicon uses a numeric value. But this icon file uses an unusual value.

It can still be evaluated correctly using the rule - if it is equal to 0 then it is 0. If it is not then it's 1. And 1 means the data is present. The solution is to remake the icon file with the correct icon attribute tag values.
The 'problem' with those tags/properties is that when the icon is actually loaded into memory that these tags/properties point to real memory locations where the data is actually stored.

Thus, indicating that the pointer is actually pointing toward valid data.

But, we can't actually use the original pointer values in an icon file stored on disk as the memory location where the data was loaded has no relation to the location as stored in the icon file.

One could perhaps argue that in such case it would have been nicer to let those pointers point to the actual offset in the icon file (or something to that extend) and some programs actually do something like that, but afaik that is not officially documented, nor is there any consensus on how to do that in a info file and last but not least the info file format is complicated enough as it is :)

So, any value other then 0 means data is (or should be) present and when the icon is actually loaded these values should be replaced by values of their loaded/allocated memory location.Storing an icon file simply requires to do all this in the opposite way.

Not having understood the entire problem I am a bit surprised that some programs seem to 'choke' on certain icons as the available specifications seem clear enough to me. On the other hand, that is easy for me to say because after having tested over 100.000 info files i have only managed to come across one defected icon file (and for the life of me I seem unable to figure out how to detect/handle it properly: the info file indicates that there should be data present while it actually isn't present in the file so my (pre)calculations of the info file size seem to go wrong somewhere (thus removed again from my code until further notice  :) )).

I apologize for letting the thread slide away a bit from the original topic. Any request/question/discussion specifically about my tool ii can be made in its own separate thread.


miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #146 on: February 17, 2023, 10:53:53 AM
Thanks for the information.

I've fixed the problem on my end. Not sure if it's an issue with Magellan or if it happens on Wanderer as well.

For drag-n-drop IconClone will test the filename to check for '.' dot in the name. For drag-n-drop that may have two causes, both of which are handled now. First it could have a dot such as Image.png.info or Image.bmp.info which usually indicates it uses a def icon. That's ok. But after we detect the dot in the name then we test for .info which should not be there. Otherwise it would be Templates.info.info which doesn't exist. So it will prompt with an error instead.

The solution is to use the file requester buttons which specifically returns the entire filename such as Templates.info which loads & displays correctly.

This problem happens when the system returns a bad filename.  >:(
« Last Edit: February 17, 2023, 11:56:44 AM by miker1264 »



miker1264

  • Legendary Member
  • *****
    • Posts: 1827
    • Karma: +84/-6
Reply #147 on: February 17, 2023, 11:55:02 AM
IconClone version 1.09 has received many updates & improvements thanks to valuable input from users.

Though I expected to release the new version a week ago it will be just a few more days to finish the new updates.



Amiwell

  • Legendary Member
  • *****
    • Posts: 2616
    • Karma: +35/-4
  • Peace
Reply #148 on: February 17, 2023, 11:58:10 AM
Thank's Miker :)



AMIGASYSTEM

  • Global Moderator
  • Legendary Member
  • *****
    • Posts: 3744
    • Karma: +69/-2
  • AROS One
    • AROS One
Reply #149 on: February 17, 2023, 02:01:15 PM
IconClone version 1.09 has received many updates & improvements thanks to valuable input from users.

Though I expected to release the new version a week ago it will be just a few more days to finish the new updates.

Thanks Miker, IconClone is getting better and better, it's worth the wait !