
-----------------------------------
BPhelmet
Sun Dec 12, 2004 10:40 pm

how do you make a picture fade?
-----------------------------------
you know the Pic.Draw  pictures

-----------------------------------
Neo
Sun Dec 12, 2004 11:08 pm


-----------------------------------

View.Set ("graphics:200;160,nobuttonbar,nocursor,noecho")

Draw.FillBox (0, 0, maxx, maxy, black)
Draw.FillOval (98, 77, 71, 71, yellow)
Draw.FillOval (75, 104, 15, 15, blue)
Draw.FillOval (116, 103, 14, 14, blue)
Draw.FillArc (93, 63, 32, 32, 180, 0, blue)

loop
    drawdot (Rand.Int (0, maxx), Rand.Int (0, maxy), black)
end loop

-----------------------------------
beard0
Sun Dec 12, 2004 11:09 pm


-----------------------------------
You're going to have to use the RGB commands.  Read in the pixels, one by one, into an array, then draw the pixels with RGB values 10% closer to 0.  Repeat 10 times.  You'll want to do offscreen stuff, cause it will take a while.  You may even want to first generate all the pictures you need, so that when you want to fade, you can do so quickly.

-----------------------------------
beard0
Sun Dec 12, 2004 11:38 pm


-----------------------------------
Here's what I was talking about:

-----------------------------------
BPhelmet
Mon Dec 13, 2004 9:57 pm


-----------------------------------
Here's what I was talking about:


Thx man, thx alot!!!!!!!!!!!!! :D  :D  :D  :D

-----------------------------------
BPhelmet
Mon Dec 13, 2004 10:13 pm


-----------------------------------
but it is not very good with big pictures is it?

-----------------------------------
BPhelmet
Mon Dec 13, 2004 10:19 pm


-----------------------------------
and um....... why is it so slow when doing a big picture?

-----------------------------------
Delos
Mon Dec 13, 2004 10:58 pm


-----------------------------------
A "big" picture is something that has a lot of pixels.  Say it is 100 pixels by 100 pixels.  Thats 100^2 = 10 000 pixels.  That means, the programme has to go through 10 000 loops initially to read the RGB values, then again to calculate and setup the new ones, reiterating as many times as needed.

Once you get to something like 640x480...you're talking 300 000+ pixels to deal with.  Using this forceful algorithm (these are usually the easiest, but lack finesse), that's a lot of work for the cpu to do.
I've also got a feeling that if OOT were able to access Graphics Cards, thing would be faster, but that's just speculation on my part.  I have not the expertise nor experience to verify it...quite likely that others do!

-----------------------------------
BPhelmet
Tue Dec 14, 2004 7:35 pm


-----------------------------------
is there any other way?

-----------------------------------
beard0
Tue Dec 14, 2004 9:40 pm


-----------------------------------
For a nice progressive fade?  No, not that I know of.
You could however use the "speckle-fade" method shown by Neo for something faster.

-----------------------------------
BPhelmet
Wed Dec 15, 2004 9:38 pm


-----------------------------------
i guess i'll use that then
