create icon pack windows

Share your advanced PureBasic knowledge/code with the community.
User avatar
idle
Always Here
Always Here
Posts: 5834
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: create icon pack windows

Post by idle »

Piero wrote: Tue Apr 02, 2024 6:32 pm
idle wrote: Tue Apr 02, 2024 4:28 amyou stupid, spaghetti-slurping cretin
I smell racism here: may you eternally eat pineapple pizza in hell
:lol:
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: create icon pack windows

Post by Caronte3D »

Yeah! rebuid icon cache does the trick :D
BarryG
Addict
Addict
Posts: 4118
Joined: Thu Apr 18, 2019 8:17 am

Re: create icon pack windows

Post by BarryG »

Piero wrote: Tue Apr 02, 2024 6:32 pmmay you eternally eat pineapple pizza in hell
Pizza with pineapple (aka "hawaiian pizza") is extremely popular here in Australia for decades, so it's always weird for me to see when people make fun of it. It's like someone making fun of someone winning the lottery; it doesn't make any sense. :shock: I'd love to eat pineapple pizza eternally! :lol:
User avatar
idle
Always Here
Always Here
Posts: 5834
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: create icon pack windows

Post by idle »

I've updated it with code from ChrisR, so you can specify the sizes in the parameters

Code: Select all

CreateIconFile(file$,1,"16x24x32x48x64x96x128x256")
User avatar
idle
Always Here
Always Here
Posts: 5834
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: create icon pack windows

Post by idle »

BarryG wrote: Tue Apr 02, 2024 10:15 pm
Piero wrote: Tue Apr 02, 2024 6:32 pmmay you eternally eat pineapple pizza in hell
Pizza with pineapple (aka "hawaiian pizza") is extremely popular here in Australia for decades, so it's always weird for me to see when people make fun of it. It's like someone making fun of someone winning the lottery; it doesn't make any sense. :shock: I'd love to eat pineapple pizza eternally! :lol:
I do unholy things to pizza. my not so secret marinara, cook down onions garlic aubergine in butter and olive oil add in olives capers... prep your bases use humus a bit of tomato paste or pesto. Add sea food, to the pot clams mussels calamari, mix though for a minute and let sit while you grate pamisan and mozzerla. then you can bang out as many pizza as you need in shot order and no ones the wiser that the nom nom nom comes from the Aubergine obviously you have to dice and salt it to get rid of the bitterness but it adds a good body to the topping.

oh and I updated the code
I've updated it with code from ChrisR, so you can specify the sizes in the parameters

Code: Select all

CreateIconFile(file$,1,"16x24x32x48x64x96x128x256")
BarryG
Addict
Addict
Posts: 4118
Joined: Thu Apr 18, 2019 8:17 am

Re: create icon pack windows

Post by BarryG »

idle wrote: Tue Apr 02, 2024 10:31 pmoh and I updated the code
:lol: Thanks for the update.
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: create icon pack windows

Post by AZJIO »

It's easier to read separated by commas

Code: Select all

CreateIconFile(file$,1,"16,24,32,48,64,96,128,256")
User avatar
ChrisR
Addict
Addict
Posts: 1466
Joined: Sun Jan 08, 2017 10:27 pm
Location: France

Re: create icon pack windows

Post by ChrisR »

Yeah, probably easier to read, Elon Musk doesn't agree, he prefers Xs :wink:
And I don't agree either, the easiest way to read it is not to use the optional parameter :P

Code: Select all

CreateIconFile(file$,1)
And use the default value with the sizes recommended by Microsoft 16, 24, 32, 48 and 256
Not a big deal to change it anyway :)
User avatar
Piero
Addict
Addict
Posts: 862
Joined: Sat Apr 29, 2023 6:04 pm
Location: Italy

Re: create icon pack windows

Post by Piero »

BarryG wrote: Tue Apr 02, 2024 10:15 pmPizza with pineapple (aka "hawaiian pizza") is extremely popular here in Australia for decades, so it's always weird for me to see when people make fun of it. It's like someone making fun of someone winning the lottery; it doesn't make any sense. :shock: I'd love to eat pineapple pizza eternally! :lol:
Why are you telling me this?
I had nothing against Australian People until now
BarryG
Addict
Addict
Posts: 4118
Joined: Thu Apr 18, 2019 8:17 am

Re: create icon pack windows

Post by BarryG »

Here's a famous comedy skit from an Australian TV show where he mentions Hawaiian pizza -> https://www.youtube.com/watch?v=LJtNHs4BfYg

It's not a skit about pizzas, but it's well worth spending the 4 minutes to watch this; it's gold! Especially the bit about folding up. :D
AZJIO
Addict
Addict
Posts: 2141
Joined: Sun May 14, 2017 1:48 am

Re: create icon pack windows

Post by AZJIO »

I tried adding this and was having trouble.
1. When using the "2D Drawing" library and adding the #PB_Image_Transparent constant, I get a broken file. Another program, when trying to open it, asks “would you like to fix the transparency?”. Without the #PB_Image_Transparent flag it works fine, but there is no transparency.
2. When using the VectorDrawing library, I add an image to the surface using DrawVectorImage(), but I cannot use the CustomFilterCallback() function to make the pixels transparent.
3. If I make a transparent image CreateImage + #PB_Image_Transparent, then copying using DrawVectorImage() does not give a positive result.

Code: Select all

#img = 0
#img2 = 1
If CreateImage(#img2,16,16,32,#PB_Image_Transparent) 
	If StartDrawing(ImageOutput(#img2))
        Box(4, 4, 8, 8, $00FF00)
		StopDrawing()
	EndIf
EndIf

If CreateImage(#img,16,16,32,#PB_Image_Transparent) 
	If StartVectorDrawing(ImageVectorOutput(#img))
		DrawVectorImage(ImageID(#img2), 255, 16, 16)
		StopVectorDrawing()
	EndIf
EndIf

file$ = "C:\folder\icon.ico"
CreateIconFile(file$, #img, "16")
Post Reply