Main Menu

Overlays?

Started by Scott_Bro, September 20, 2018, 06:47:06 AM

Previous topic - Next topic

Scott_Bro


Hello Ya'll.

It's been a long time since I've been here.
Hope people are still enjoying PlayBasic as it is a great proto-typing language.

Kevin,  I'm having trouble with AFX Images and ARGB,RGBA.

I need a function that will let me create image overlays with full alpha channel ranges.
One that takes a say .png file and takes full advantage of the 2-bit technology.

!.) Base Image.  (the one under)
2.) Alpha Channel values.
3.) Colour Values.

I really need a function badly if I am going to have lots of images that have overlays. Either in a scene or just a lot on the screen.
And especially in animations.

But I would like to keep code snippet down to each 1,2 and 3 above.
Where I'm working with 3 images.
The one underneath, the alpha, and the colour.

Can you please help.






kevin


 
QuoteI need a function that will let me create image overlays with full alpha channel ranges.
One that takes a say .png file and takes full advantage of the 2-bit technology.

  Alpha is 8bit so I don't really understand what your getting at with this 2bit stuff. 


stevmjon

hey scottie

i made a demo showing alpha layers, with a few methods for displaying them.

> image 1:  draw .png image solid, with alpha off
> image 2: draw .png image transparent, with alpha on
> image 3: draw .png image with a new mask layer created for it

i also added an option to see the command ARGB(x,x,x,x) used to create the mask layer. manually adjust a variable in the code that i added to see this.
* ARGB() manually sets the colour for the mask
* RGBA() etc reads the colours that have set using above command.

i hope this helps you understand AFX images better, as i was confused when i learnt it too.

not 100% sure what you mean with the 3 layers you described. can you make an image to show it?
i am happy to help where i can.

   stevmjon
It's easy to start a program, but harder to finish it...

I think that means i am getting old and get side tracked too easy.