English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 29 January 2018, 19:59   #2121
amigasith
Registered User
 
amigasith's Avatar
 
Join Date: Jan 2013
Location: Wild South / Germany
Age: 48
Posts: 271
Quote:
Originally Posted by gulliver View Post
PeterK, You dont bug us, we feel in constant debt to you, because your work in IconLib is worth a lot for us.
This.
amigasith is offline  
Old 29 January 2018, 22:28   #2122
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,383
Update to icon.library 46.4.472:

Ok, this is my last try here to publish a working test version with the Ram Disk icon synchronization to Sys/def_RAM.info in ENV: and ENVARC:. If you know how to use Enforcer or the MuTools, let them run in the background. I don't want to upload a buggy version to Aminet. Icon position and window settings should be restored on all systems now, including DOpus5 and AmiKit. And the Ram Disk ghosting is disabled for ever.
PeterK is offline  
Old 29 January 2018, 23:24   #2123
indigolemon
Bit Copying Bard
 
indigolemon's Avatar
 
Join Date: Jan 2017
Location: Kelty, Fife, Scotland
Age: 41
Posts: 1,293
Quote:
Originally Posted by PeterK View Post
Update to icon.library 46.4.472:

Ok, this is my last try here to publish a working test version with the Ram Disk icon synchronization to Sys/def_RAM.info in ENV: and ENVARC:. If you know how to use Enforcer or the MuTools, let them run in the background. I don't want to upload a buggy version to Aminet. Icon position and window settings should be restored on all systems now, including DOpus5 and AmiKit. And the Ram Disk ghosting is disabled for ever.
Working from home again tomorrow so will give this a go and feedback, thanks Peter
indigolemon is offline  
Old 30 January 2018, 09:41   #2124
Amiga68k
Registered User
 
Amiga68k's Avatar
 
Join Date: Oct 2017
Location: Amsterdam
Posts: 231
Hi Peter, not stumbled into any issues with this version yet I do have a question though.

What is the reasoning behind the 'different approach' of using the version string? I notice that the 3 last digits are part of the lib_IdString, but are missing in the lib_Version value. Output from the shell always displays 46.4 in this case. Or will this be bumped to 46.5 or something when you are happy with the result?

Examples:
Code:
6.Ram Disk:> version scsi.device full
scsi.device 43.45 (05/13/2008)
6.Ram Disk:> version exec.library full
exec.library 45.20 (01/06/2002)
6.Ram Disk:> version icon.library full
icon.library 46.4
(68020)
Attached Thumbnails
Click image for larger version

Name:	icon.library.png
Views:	168
Size:	4.4 KB
ID:	56526  
Amiga68k is offline  
Old 30 January 2018, 10:49   #2125
indigolemon
Bit Copying Bard
 
indigolemon's Avatar
 
Join Date: Jan 2017
Location: Kelty, Fife, Scotland
Age: 41
Posts: 1,293
Quote:
Originally Posted by Amiga68k View Post
Hi Peter, not stumbled into any issues with this version yet
This echoes my experience - no errors, warnings, alerts etc here. All seems good at this end after running the system for a few hours this morning.

I'm going to read up on MuForce and will see how i get on there
indigolemon is offline  
Old 30 January 2018, 18:29   #2126
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,383
Quote:
Originally Posted by Amiga68k View Post
Hi Peter, not stumbled into any issues with this version yet I do have a question though.

What is the reasoning behind the 'different approach' of using the version string? I notice that the 3 last digits are part of the lib_IdString, but are missing in the lib_Version value. Output from the shell always displays 46.4 in this case. Or will this be bumped to 46.5 or something when you are happy with the result?
Thanks for testing the library, Amiga68k!

What you discovered is a limitation of the Version instruction concerning the version output for libraries and devices. Lib_Version is always the word with the value 46 and lib_Revision the word with the value 4 for my library. There is no definition for a lib_Build or similar in the library structure. So a simple call "Version icon.library" would return 46.4. If you add the option FULL then the version command also looks into the lib_IdString for something in brackets and displays it, which is usually the the date string. But Version would not display the complete lib_IdString, because it's safer to take name, version and revision from ln_Name, lib_Version and lib_Revision. Lib_IdString could be everything like "IconLib forever!". Even so, it's possible to get my full lib_IdString with the Version command because I've inserted the string "$VER:" in front of the lib_IdString. Just read the file with "Version Libs:icon.library FILE FULL" and you will get the complete information including the build number.

Update: The "$VER:" string is only required for some other tools, probably not for the Version command.

@indigolemon
Thanks for your feedback!

Last edited by PeterK; 30 January 2018 at 22:07.
PeterK is offline  
Old 30 January 2018, 18:54   #2127
Amiga68k
Registered User
 
Amiga68k's Avatar
 
Join Date: Oct 2017
Location: Amsterdam
Posts: 231
Quote:
Originally Posted by PeterK View Post
Thanks for testing the library, Amiga68k!

What you discovered is a limitation of the Version instruction concerning the version output for libraries and devices. Lib_Version is always the word with the value 46 and lib_Revision the word with the value 4 for my library. There is no definition for a lib_Build or similar in the library structure. So a simple call "Version icon.library" would return 46.4. If you all add the option FULL then the version command also looks into the lib_IdString for something in brackets and displays it, which is usually the the date string. But Version would not display the complete lib_IdString, because it's safer to take name, version and revision from lib_Name, lib_Version and lib_Revision. Lib_IdString could be everything like "IconLib forever!". Even so, it's possible to get my full lib_IdString with the Version command because I've inserted the string "$VER:" in front of the lib_IdString. Just read the file with "Version Libs:icon.library FILE FULL" and you will get the complete information including the build number.
Ah, understood, thanks for the lesson in Version Peter! Do I assume correctly that the value of lib_Revision can only contain one digit then? '4.472' is not possible in this case?

Just tested the output of your example and that works quite alright indeed (it is rather picky though, you have to include 'Libs:' otherwise it complains it cannot find the object).
Amiga68k is offline  
Old 30 January 2018, 19:10   #2128
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,383
Quote:
Originally Posted by Amiga68k View Post
Do I assume correctly that the value of lib_Revision can only contain one digit then? '4.472' is not possible in this case?

... you have to include 'Libs:' otherwise it complains it cannot find the object).
Yes, lib_Version and lib_Revision are integer numbers (words in assembler) but no pointers to text strings like ln_name or lib_IdString.

The option FILE needs a path to find the object. Without this option the Version command retrieves the data through the exec library list (no path) from the library structure in memory and not from the file on your harddisk.

Update: The "$VER:" string is only required for some other tools, probably not for the Version command.

Last edited by PeterK; 30 January 2018 at 22:08.
PeterK is offline  
Old 02 February 2018, 22:21   #2129
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,383
The icon.library 46.4.473 has been dumped on Aminet this night.

Aminet - util/libs/IconLib_46.4.lha Wait ...

Last edited by PeterK; 03 February 2018 at 01:31.
PeterK is offline  
Old 03 February 2018, 00:31   #2130
dannyp1
Registered User
 
Join Date: Nov 2009
Location: Michigan USA
Posts: 170
The Aminet posting says it it version 46.4.464? Did you just forget to change that at the top of the post?

Maybe I am still looking at the old listing as I looked at your link above. The new version might not be up yet.

Last edited by dannyp1; 03 February 2018 at 00:35. Reason: Other thought
dannyp1 is offline  
Old 03 February 2018, 00:37   #2131
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
It will probably be available tomorrow!
AMIGASYSTEM is offline  
Old 03 February 2018, 01:27   #2132
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,383
Yes, yes, it takes some hours until Aminet will spit it out ..........

Seems that at least six users didn't know that, because they all downloaded the old version from Aminet instead of being a little patient ......

Coming out now ...

Last edited by PeterK; 03 February 2018 at 06:36.
PeterK is offline  
Old 13 February 2018, 17:51   #2133
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,383
Update to icon.library 46.4.474:

Reworked the color reduction from TrueColor to 256 colors for the OS4 and PNG icons to achieve a better pseudo dithering. It uses a checkerboard pattern now to mix the colors instead of vertical stripes as before. Alternately the brightness of the pixels is pushed up or pulled down by 2. This method is very simple and fast.
PeterK is offline  
Old 13 February 2018, 18:55   #2134
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,262
Thanks Peter
AMIGASYSTEM is offline  
Old 14 February 2018, 16:13   #2135
indigolemon
Bit Copying Bard
 
indigolemon's Avatar
 
Join Date: Jan 2017
Location: Kelty, Fife, Scotland
Age: 41
Posts: 1,293
Cheers Peter, will give it a shot later on
indigolemon is offline  
Old 14 February 2018, 16:21   #2136
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
Peter, crazy question here: I know you release the source to this, and I was wondering: is it possible, you think, to somehow use it, to be able to display icon information, in another way? I mean, not in the workbench.

For example: read a directory and for every .info file found, display the icon in an arbitrary way. I'm thinking of a Blitz Basic implementation.

not sure how possible this is, I am a bit talking out of my league here, but I hope you understand what I mean. I just want to know if it would be possible to display icons in other screens (any screen) as if they were any images!
Amiga1992 is offline  
Old 14 February 2018, 17:57   #2137
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,383
Quote:
Originally Posted by Akira View Post
... is it possible ... read a directory and for every .info file found, display the icon in an arbitrary way. I'm thinking of a Blitz Basic implementation.

I just want to know if it would be possible to display icons in other screens (any screen) as if they were any images!
Yes, that's possible. The details are all explained in the autodocs for icon.library v44+.

After once opening icon.library you could read in the icons with the function GetIconTagList(iconname, taglist) where one of your tags should be ICONGETA_Screen followed by a pointer to your screen structure. Icon.library then remaps the icon to your screen's palette by default (can also be disabled). An extended OS 3.5 DiskObject structure is returned.

In case you just need the planar images of this icon you can get them from the DiskObject structure under do_Gadget.GadgetRender and do_Gadget.SelectRender.

But if you prefer to use the 256 color OS 3.5 chunky images (not mapped to the screen) and the RGB palette then you can call IconControlA(DiskObject, taglist) with the tags ICONCTRLA_GetImage1/2, ICONCTRLA_GetPalette1/2, ICONCTRLA_GetImageMask1/2, ICONCTRLA_GetTransparentColor1/2 and other information. This method gives better quality on Hi/TrueColor screens by using cybergraphics.library and Read/WritePixelArray() (ReadPixelArray trashes dataregister 2 if you don't preserve it!).

Last edited by PeterK; 14 February 2018 at 18:09.
PeterK is offline  
Old 14 February 2018, 18:33   #2138
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
What I am thinking of is to take the bitmap data and display them on whatever screen I would open with Blitz Basic (not a Workbench.Intuition screen) . How about that?
In the way one would load any amiga iff image, but pinching the data from the icon instead.
Amiga1992 is offline  
Old 14 February 2018, 18:51   #2139
PeterK
Registered User
 
Join Date: Apr 2005
Location: digital hell, Germany, after 1984, but worse
Posts: 3,383
Quote:
Originally Posted by Akira View Post
take the bitmap data and display them on whatever screen ...
Yes, do_Gadget.GadgetRender and do_Gadget.SelectRender are image structures with a data pointer to the joined image planes. You can simply create a bitmap structure and append the plane pointers (with their offsets) to that bitmap. If you want to use BltMaskBitMapRastport() to make the icon transparent over the background then call IconControlA() before with a tag ICONCTRLA_GetImageMask1/2.

PS. I'm not sure if ImageMask2 would be available without calling GetImage2 first or using my command NoDelayedImage2. (Only WB is affected)

Last edited by PeterK; 14 February 2018 at 21:18.
PeterK is offline  
Old 14 February 2018, 18:57   #2140
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,646
Amazing, thanks so much Peter!!
I gotta experiment with this
Amiga1992 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
ClassicWB Full and icon.library 46.4 Retroplay project.ClassicWB 8 05 August 2018 13:57
WB library conflict/versions Amiga1992 support.Apps 3 22 July 2010 18:47
PNG Icon to Color Icon Converter? Leandro Jardim request.Apps 1 24 May 2010 04:39
What's the latest version of icon.library for OS3.9? NovaCoder support.Apps 3 30 June 2009 15:43
Requesting icon.library v44+... nikvest request.Other 2 16 September 2007 01:58

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 17:18.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.19295 seconds with 14 queries