rename cam images
Posted: Wed Sep 29, 2004 11:45 pm
I found this on the CodeArchiv , could someone help me .i want it to save the pictures and rename them with a number so they are all saved as it refreshs .
Thank you for the help
Thank you for the help
Code: Select all
; German forum: http://robsite.de/php/pureboard/viewtopic.php?t=2015&highlight=
; Author: Danilo
; Date: 18. August 2003
; #page.s defines the address of the image to load
; #page.s definiert die Adresse des zu ladenden Bildes
Procedure UpdateImage()
#page.s = "http://media.g4techtv.com/images/webcam/tss/sarah.jpg" ; there is probably only every xx minutes a new picture on the server !
DeleteUrlCacheEntry_(#page)
URLDownloadToFile_(0,#page, "c:\__temp.jpg", 0, 0)
LoadImage(0, "c:\__temp.jpg")
DeleteFile("c:\__temp.jpg")
If GadgetID(0)
SetGadgetState(0,UseImage(0))
EndIf
EndProcedure
UseJPEGImageDecoder()
UpdateImage()
OpenWindow(0, 0, 0, ImageWidth(), ImageHeight(), #PB_Window_SystemMenu, "PB - Webcam!")
CreateGadgetList(WindowID())
ImageGadget(0,0,0,ImageWidth(),ImageHeight(),ImageID(),#PB_Image_Border)
SetTimer_(WindowID(),1,10000,0)
Repeat
Select WaitWindowEvent()
Case #PB_Event_CloseWindow
End
Case #WM_TIMER
UpDateImage()
Beep_(800,50)
EndSelect
ForEver