Eric Mersmann is probably the most correct person to have a real answer!

The utilitarian answer is: if you somehow fall afoul of someone who wants to sue you, no amount of being within the letter of the law will keep you from being sued.

The in-my-experience/ethics-based answer is: it’s at least a derivative work, if not an original work (if you make the source image, for example). If the original source is public domain or has a license that allows transformation, then you’re probably on the right side of the law. If you don’t have rights to use whatever you’re putting through the filter, you may not be on solid ground unless you’re using the derivative under fair use (education, parody, a couple other things). I personally wouldn’t use anything I didn’t have rights to in its original form.

I suspect that the sites terms of service will have a clause that assigns them some kind of rights to the image you get from it (cuz otherwise they couldn’t transmit it back to you, some other legal stuff is behind that – this also enables things like how sometimes Facebook uses/used people’s personal photos in their ads). That may not actually clarify anything, but then again it might!

(Edit: scooped by everyone re : ToS. But re: the “changed enough” thing, that as far as I know is literally up to the jury. The “change 5 things and its a new work” or other rules of thumb stuff is all bs, legally)