Code: Select all
For i = 0 To ImageHeight(imageFiles()\imgBackup\i)-1
For z = 0 To ImageWidth(imageFiles()\imgBackup\i)-1
If Point(z,i) = cKey
Plot(z,i,RGBA(0,0,0,0))
EndIf
Next z
Next i
Code: Select all
If StartDrawing(ImageOutput(imageFiles()\imgBackup\i))
cKey = imageFiles()\ckeys()
cBlank = RGBA(0,0,0,0)
If cKey >= 0
Buffer = DrawingBuffer()
Pitch = DrawingBufferPitch()
PixelFormat = DrawingBufferPixelFormat()
If PixelFormat = #PB_PixelFormat_32Bits_RGB Or PixelFormat = #PB_PixelFormat_32Bits_BGR
Offset = 4
Else ; 24-bit
Offset = 3
EndIf
For y = 0 To ImageHeight(imageFiles()\imgBackup\i)-1
*Line.Pixel = Buffer+Pitch*y
For x = 0 To ImageWidth(imageFiles()\imgBackup\i)-1
Debug "data colors: "+Str(x)+" "+Str(y)+" "+Str(*Line\Pixel)+" "+Str(cKey)+" "+Str(cBlank)
If *Line\Pixel = cKey
*Line\Pixel = cBlank
EndIf
*Line+Offset
Next x
Next y
endif
stopDrawing()
Many thanks for your help!