CreateIcon not working properly

Report any Hollywood bugs here
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

CreateIcon not working properly

Post 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 ?
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: CreateIcon not working properly

Post by airsoftsoftwair »

What do you mean by "2 pictures side by side in icon"? Where do you see those?
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

Re: CreateIcon not working properly

Post by sinisrus »

I want to create a two-state icon
Here MyIcon there is a problem
Image
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: CreateIcon not working properly

Post 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.
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

Re: CreateIcon not working properly

Post 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
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: CreateIcon not working properly

Post 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.
User avatar
jPV
Posts: 603
Joined: Sat Mar 26, 2016 10:44 am
Location: RNO
Contact:

Re: CreateIcon not working properly

Post 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.
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

Re: CreateIcon not working properly

Post by sinisrus »

@JPV

Very thank !!!
sinisrus
Posts: 347
Joined: Tue Apr 21, 2015 5:43 pm

Re: CreateIcon not working properly

Post by sinisrus »

And for extract 2 picture of icon is it possible with hollywood ?
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: CreateIcon not working properly

Post by airsoftsoftwair »

No, not yet, but it's planned.
Post Reply