Alors j’ai crée ce bout de Code, mais le problème c’est qu’il est très lent !!
Y’a-t-il un moyen de l’optimisé ?

Code : Tout sélectionner
UseJPEGImageDecoder()
UsePNGImageDecoder()
InitSprite()
InitScreen()
InitMouse()
InitKeyboard()
Structure info
x.d
y.d
couleur.l
EndStructure
Global Dim pixel.info(99999)
;----------(changez l'image par une dans votre DD de préférence 500x500 ou plus)
LoadImage(0,"c:\image.jpg")
OpenWindow(0,0,0,500,500,"teste")
OpenWindowedScreen(WindowID(0),0,0,500,500,0,0,0)
FlipBuffers()
Repeat
;ClearScreen(0)
ExamineMouse()
posx = MouseX()
posy = MouseY()
ExamineKeyboard()
If KeyboardPushed(#PB_Key_Escape)
End
EndIf
If posx <> bpx And posy <> bpy
ClearScreen(0)
StartDrawing(ImageOutput(0))
bpx = posx
bpy = posy
i = 0
For r = 0 To 80
For a = 0 To 450
an.d = a / 70
x.d = Sin(an)
y.d = Cos(an)
x = x * r + posx
y = y * r + posy
If (x > 1) And (y > 1) And (x < 490) And (y < 490)
coul = Point(x,y)
ro = Red(coul)-r*3
g = Green(coul)-r*3
b = Blue(coul)-r*3
If ro < 0:ro = 0:EndIf
If g < 0:g = 0:EndIf
If b < 0:b = 0:EndIf
coulf = RGB(ro,g,b)
pixel(i)\x = x
pixel(i)\y = y
pixel(i)\couleur = coulf
max = i
i = i + 1
EndIf
Next a
Next r
StopDrawing()
StartDrawing(ScreenOutput())
For n = 0 To max
Plot(pixel(n)\x,pixel(n)\y,pixel(n)\couleur)
Next n
StopDrawing()
FlipBuffers()
EndIf
event = WindowEvent()
Until event = #PB_Event_CloseWindow