
-----------------------------------
Dudewhatzup1
Tue May 03, 2005 8:11 pm

Pic slowly drawn and slowly fade help
-----------------------------------
How do you load a picture slowly and make it fade slowly?

for example like a pic like my avatar and make it slowly fade in and then slowly fade out ... 
i know how to make text slowly fade in and fade out but not pics like this i am not looking for the sprinkle effect but a line by line change :S if anyone understood that....

-----------------------------------
jamonathin
Wed May 04, 2005 6:56 am


-----------------------------------
if you mean showing a 1 pixel line at a time, you can just do a for loop like this, and play with the delays and colors.

var pic : int := Pic.FileNew ("light.jpg")
setscreen ("offscreenonly")
for decreasing i : Pic.Height (pic) .. 1
    cls
    Pic.Draw (pic, 0, 0, picCopy)
    drawfillbox (0, 0, Pic.Width (pic), i, white)
    View.Update
    delay (1)
end for

Or if this is the line thing you mean.

var pic : int := Pic.FileNew ("light.jpg")
var line : array 1 .. Pic.Height (pic) of int
for i : 1 .. upper (line)
    line (i) := 1
end for
setscreen ("offscreenonly")
loop
    cls
    line (Rand.Int (1, upper (line))) := 0
    Pic.Draw (pic, 0, 0, picCopy)
    for i : 1 .. upper (line)
        if line (i) = 1 then
            drawline (0, i, Pic.Width (pic), i, white)
        end if
    end for
    View.Update
    delay (1)
    exit when hasch
end loop

And there's plenty more you can do, juss be creative.  :)

-----------------------------------
Dudewhatzup1
Wed May 04, 2005 10:44 am


-----------------------------------
THANKS ALOT *cries out of joy* lol ... there is a problem i think im just stupid (like ur signiture says  :lol: ) but how come when i try to run it it says somethign like "Illegal picture ID number "0". (probable cause: picture was not sucessfully created)"   

????????????? :? :S

-----------------------------------
Cervantes
Wed May 04, 2005 7:47 pm


-----------------------------------
The probable cause for such an error is the picture was not successfully created.  :wink: Do you have a picture of the same file name in the same folder as the Turing program?  Or, did you enter the full path correctly?

-----------------------------------
jamonathin
Wed May 04, 2005 8:30 pm


-----------------------------------
THANKS ALOT *cries out of joy* lol ... there is a problem i think im just stupid (like ur signiture says  :lol: ) 

Yeah no problem, lol, but I think you misunderstand my signiture.  Its used to refer to people who make something complex where it is not needed, or at least that's what I get from it.  :?

-----------------------------------
Bacchus
Thu May 05, 2005 5:46 am


-----------------------------------
Occam's razor

-----------------------------------
Dudewhatzup1
Thu May 05, 2005 11:04 pm


-----------------------------------
wut was that all about? "...razor?"

and... My bad i meant how u slowly fade in and out pixel by pixel :P :oops:

has it something to do with RGB.get color or pic file.new? :S :?

-----------------------------------
Bacchus
Fri May 06, 2005 5:53 am


-----------------------------------
[url=http://en.wikipedia.org/wiki/Occam's_Razor]Occam's Razor basically, when there are many ways to do something, the simplest way tends to be the best

-----------------------------------
fabulos
Fri May 06, 2005 6:55 pm


-----------------------------------
what if u want the pic to fade in...as a whole and not from any direction...


how do u do dat..?

-----------------------------------
fabulos
Sat May 07, 2005 9:50 am


-----------------------------------
if i want to put antoher picture  on top of the one i just faded in...how would i do dat...

p.s.   i don't want this picture to fade in or sumthin...just drawn on top of the previous once dat's done fading in...

-----------------------------------
strike_hawk89
Sun May 08, 2005 4:18 pm


-----------------------------------
sry if u think im a noob but i cannot get those codes to work.  I changed the pic name to one on my comp, but it still didnt work.  the error message is :
Illegal picture ID number "0". (Problem cause: picture was not successfully created.).

-----------------------------------
Cervantes
Sun May 08, 2005 4:44 pm


-----------------------------------
Check that the file name is right.  Check that the file is in the same folder as the turing file.  Check that your file is of the allowable extensions (no .gifs!)

-----------------------------------
strike_hawk89
Sun May 08, 2005 5:50 pm


-----------------------------------
i did all that and it still doesnt work. i even copy and pasted the code from the help menu and it still gives the same error message as before. to be more specific, the error is on the line "Pic.Draw (picID,..."var picID: int
        var x, y : int
        
        picID := Pic.FileNew ("Himeji.bmp")
        for i : 1 .. 50
            x := Rand.Int (0, maxx)     % Random x
            y := Rand.Int (0, maxy)     % Random y
            Pic.Draw (picID, x, y, picCopy)
        end for
        Pic.Free (picID)


-----------------------------------
jamonathin
Sun May 08, 2005 5:57 pm


-----------------------------------
If you're just going to use "Himeji.bmp" or w/e then here's how you can figure out where that picture need to be.  make a new file, and save it, where ever you save that file, "Himeji.bmp" has to be there in that exact same folder.  Make sure you include very capital.

-----------------------------------
strike_hawk89
Sun May 08, 2005 6:03 pm


-----------------------------------
thanks, finally got it to work.  :D  :D  :D
