SWAbooru Development Brainstorming: Watermarks

Posted under /swa2/

I've done a bit of thinking regarding this topic so far, and I believe I have a steady design plan for applying watermarks in a smooth, respectful manner.

Initialization

A problem that I saw with creating watermarked posts on this site is the fact that it would get extraordinarily annoying for sharing content in comments and forums. There are several systems in place here that determines and renders content in various forms. Uploads (the content as it is uploaded to the server and processed), Media Assets (the content that exists in our server to be used for various means), and Posts (the content that is finalized and implements tagging, ratings, and whatnot). When content is uploaded, our in-house image renderer opens the image, resizes it multiple times and saves them to specific webp and jpeg formats given the performance boosts associated. With our currently implemented technology in mind, it's possible to append a process in creating a new post that can call upon the renderer again, and only append the watermark to the original image, never touching the other variants. This, along with clever CSS masking, makes it seem like the watermark doesn't exist until you download it. Content that remains Uploads and Assets will never be touched by this watermarker.

Possible Issues

There are several possible issues with this, however. For one, PFPs and various styling items are Media Assets. That means one day in the future, it could become a Post. This is bad, since now every PFP with that asset is no longer 1:1, thumbnails could break the hard scale limits, and other items could just be gayer than before. I propose an addition to the process, before a Post could be generated from an asset, it checks if any table includes the id of the asset. If it does, then the process is instantly aborted, keeping formatting clear. Included with this, you'll be able to check a boolean box after uploading image content to immediately abort the process of posting without scouring through the database, saving cycle times. Only the uploader has the ability to check and uncheck their assets.


For what I've researched, the watermark system is going to require an extreme amount of precision and experimentation to work. This is why I made this thread, as it's a means to sharing this concept and to expose it to more eyes in the hopes of picking apart flaws. There are so many factors in play here like "what if you regenerate an old post? ", "what if you replace an old post?", and other stuff I need to think about.

1