Page 1 of 2
CreateIcon not working properly
Posted: Mon Apr 13, 2020 12:26 am
by sinisrus
Hello,
I test function createIcon :
Code: Select all
CreateIcon(1,{{Type=#File, Image="image.png"}}) => good work
CreateIcon(1,{{Type=#File, Image="image.png", SelImage="Selimage.png"}}) => No good work => 2 pictures side by side in icon
How to create an icon with two state images ?
Re: CreateIcon not working properly
Posted: Mon Apr 13, 2020 10:33 am
by airsoftsoftwair
What do you mean by "2 pictures side by side in icon"? Where do you see those?
Re: CreateIcon not working properly
Posted: Mon Apr 13, 2020 5:02 pm
by sinisrus
I want to create a two-state icon
Here MyIcon there is a problem

Re: CreateIcon not working properly
Posted: Wed Apr 15, 2020 11:54 am
by airsoftsoftwair
Hmm, how did you create this icon? Using
SaveIcon()? That currently doesn't support Amiga icons but saves icons in a special, proprietary format based on PNG. From the doc:
Note that although Hollywood icons are normal PNG images, they contain additional metadata which is why you mustn't edit them with your favourite image manipulation tool because that might lead to the loss of said metadata. Hollywood icons should only ever be created by using the
SaveIcon() function.
Re: CreateIcon not working properly
Posted: Thu Apr 16, 2020 9:46 am
by sinisrus
I use only hollywood script and 2 picture png
My full script is:
Code: Select all
CreateIcon(1,{{Type=#FILE, Image="image.png", SelImage="Selimage.png"}})
SaveIcon(1,"ram:MyIcon.info")
Test my full archive script and picture png
https://amitheme.amiga-ng.org/amiga/Test_Icon.lha
Re: CreateIcon not working properly
Posted: Thu Apr 16, 2020 11:42 am
by airsoftsoftwair
Yes,
SaveIcon() can currently only save in Hollywood's custom icon format. It doesn't support Amiga icon formats. But this is planned for the future.
Re: CreateIcon not working properly
Posted: Thu Apr 16, 2020 8:53 pm
by jPV
If you want to make a "dual PNG icon", which works on MorphOS and at least with some 3rd party extensions on OS3 and OS4, you can just join two PNG images together by this shell command: Join image.png Selimage.png AS MyIcon.info
You can naturally execute that kind of command lines from Hollywood too.
Re: CreateIcon not working properly
Posted: Sun Apr 26, 2020 1:21 am
by sinisrus
@JPV
Very thank !!!
Re: CreateIcon not working properly
Posted: Mon Apr 27, 2020 1:31 pm
by sinisrus
And for extract 2 picture of icon is it possible with hollywood ?
Re: CreateIcon not working properly
Posted: Thu Apr 30, 2020 9:44 pm
by airsoftsoftwair
No, not yet, but it's planned.