ReplaceImageColor(old,new)

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

ReplaceImageColor(old,new)

Post by Dude »

I'd like to see a new image command that would instantly (quickly) replace all specific pixel colors in an image with another, without having to do it manually in a loop (which is far too slow for large images!).

I'd love to see it used as simply as this:

Code: Select all

If StartDrawing(ImageOutput(i))
  ReplaceImageColor(#Red,#Blue)
  StopDrawing()
EndIf
Reason for this request: viewtopic.php?f=13&t=71497&p=527671 :)