applications – Software to generate and display OLED burn-in offset map as watermark over display?

Have a Galaxy S8+ with signs of burn-in – not serious but white screens are looking a little pink in regions.
Searching for fixes to burn-in only comes up with programs to flex the pixels which I don’t believe can do anything. What I would like to find if it exists is a way to display a semi-transparent watermark over the entire screen in order to boost the blue and green pixels in the burnt regions to even out the display – the image could be either traced by user on the effected screen, or generated from a photo taken by a second camera..

Is there either an existing app on the market to do this or a way of doing it by hand with some type of hackery?

What do I change in this Python script to stop the resizing of an image when adding a watermark

I have this script which is successfully applying a watermark to an image, resizing the watermark and setting the image “quality”.
I find that it’s actually reducing the quality and resizing it to be smaller than I want.

This is a telegram bot that I’m using, I send the image to the bot, the bot is adding the watermark and then resizing. I don’t want the resizing part at all. I want the original size + the watermark.

QUESTION: How do i change this so it doesn’t resize my original image that the watermark is added to?

CURRENT FLOW

  1. I sent image to my bot which activates the script
  2. The script adds a watermark and resizes the image
  3. The script sends the resized image back to me with the watermark included

DESIRED FLOW

  1. I send image to my bot which activates script
  2. The script adds a watermark but does not resize the original image
  3. The script sends the image back to me with the watermark included

CODE 1

# -*- coding: utf-8 -*-
import telebot
import config
import random
import os
import time
from tools.tools import getting_ready

bot = telebot.TeleBot(config.BOT_TOKEN)


@bot.message_handler(commands=('start', 'help'))
def send_welcome(message):
    bot.send_message(message.chat.id, 'Hi, Send or Forward me a PHOTO!')


@bot.message_handler(func=lambda message: True)
def echo_all(message):
    bot.reply_to(message, 'Send /start or /help')


@bot.message_handler(content_types=("photo"))
def send_watermark(message):
    chat_id = message.chat.id
    sent_message = bot.reply_to(message, 'Downloading...')
    message_id = sent_message.message_id
    file = bot.get_file(message.photo(0).file_id)
    downloaded_file = bot.download_file(file.file_path)
    bot.edit_message_text(f'Downloaded!nnNow, Genarating Watermarks...nncurrent watermark: {config.WATERMARK}', chat_id=chat_id, message_id=message_id)
    __path = 'images/' + str(random.randint(100000, 999999)) + '.tmp'
    with open(__path, 'wb') as f:
        f.write(downloaded_file)
    fname = getting_ready(__path)
    os.remove(__path)
    time.sleep(2)
    bot.edit_message_text('Now, Uploading...', chat_id=chat_id, message_id=message_id)
    for i in ('black','white',):
        __file = 'images/out/{}/{}'.format(i, fname)
        __photo = open(__file, 'rb')
        bot.send_photo(message.chat.id, __photo, reply_to_message_id=message.message_id)
        os.remove(__file)
    bot.delete_message(chat_id=chat_id, message_id=message_id)


print('watermark bot started successfully!')
bot.polling()

CODE 2

from PIL import Image, ImageFont, ImageDraw, ImageEnhance
import hashlib
import piexif
import config


def getting_ready(path):
    fname = md5(path) + '.jpg'
    image = Image.open(path).convert('RGB')
    try:
        exif_dict = piexif.load(image.info('exif'))
        orientation = exif_dict('0th')(274)
    except KeyError:
        orientation = None
    rotate_values = {3: 180, 6: 270, 8: 90}
    if orientation in rotate_values:
        image = image.rotate(rotate_values(orientation), expand=True)
    for color in ('black', 'white'):
        watermark(image, fname, color)
    return fname


def watermark(img, new_fname, color):
    text = config.WATERMARK
    wm = Image.new('RGBA', img.size, (0, 0, 0, 0))
    fontsize = img.size(1) // 100 * config.FONT_SIZE
    font = ImageFont.truetype(f'tools/fonts/{config.FONT_NAME}', fontsize)
    indent = fontsize // 8
    w, h = font.getsize(text)
    text_position = (img.size(0) - w - indent, img.size(1) - h - indent)
    draw = ImageDraw.Draw(wm, 'RGBA')
    draw.text(text_position, text, font=font, fill=color)
    alpha = wm.split()(3)
    alpha = ImageEnhance.Brightness(alpha).enhance(config.TRANSPARENCY)
    wm.putalpha(alpha)
    out_path = 'images/out/{}/{}'.format(color, new_fname)
    Image.composite(wm, img, wm).save(out_path, 'JPEG', optimize=False, quality=config.QUALITY)


def md5(path):
    with open(path, 'rb') as f:
        md5hash = hashlib.md5()
        for chunk in iter(lambda: f.read(4096), b''):
            md5hash.update(chunk)
    return md5hash.hexdigest()

c++ – Simplifying small watermark application

I recently started out with C++ and I am working on an application that can watermark entire directories of images at once.

Currently you can call the program with an argument of the target directory where the images are stored and an argument for the path of which watermark image to use.

It works so far but I think my code is a bit messy. I don’t really know how to make it more readable and more clean, so I am asking for your help.

I would really appreciate it if people could look at my code and review it. All feedback is welcome.

A link to my GitHub repository: github repo

Main.CPP:

#include <iostream>
#include "FileSystem.h"
#include "Watermarker.h"

int main(int arc, const char** argv)
{
    // Get the given argument for the target directory
    std::string targetDirectory = argv(1);

    // Get the given argument for the watermark file
    std::string watermarkPath = argv(2);

    FileSystem fileSystem;

    // Check if the target directory is valid
    if (!fileSystem.checkDirectory(targetDirectory)) { return 1; }

    // Create an output directory where the new watermarked images will be stored
    std::string path = targetDirectory + "\watermarked_images";
    fileSystem.createDirectory(path);

    Watermarker marker;

    // Mark all the images in the target directory with the watermarkPath image
    marker.mark(targetDirectory, watermarkPath);
}

FileSystem.h

#pragma once

#include <string>
#include <vector>
#include <boost/filesystem.hpp>

class FileSystem
{
private:
    std::vector<std::string> validExtensions = {
        ".png",
        ".jpg",
        ".tiff",
        ".jpeg"
    };

public:
    void createDirectory(std::string& directory);
    bool checkDirectory(std::string& directory);
    bool checkFile(boost::filesystem::path& filePath);
};

FileSystem.CPP

#include "FileSystem.h"
#include <iostream>
#include <boost/algorithm/string.hpp>

void FileSystem::createDirectory(std::string& directory)
{
    boost::filesystem::create_directory(directory);
}

bool FileSystem::checkDirectory(std::string& directory)
{
    if (boost::filesystem::exists(directory))
    {
        if (!boost::filesystem::is_directory(directory))
        {
            std::cout << "The given path is not a directory.n";
            return false;
        }
    }
    else
    {
        std::cout << directory << " does not existn";
        return false;
    }

    return true;
}

bool FileSystem::checkFile(boost::filesystem::path& filePath)
{
    // Check if the file is a regular file
    if (!boost::filesystem::is_regular_file(filePath)) { return false; }

    // Get the file extension in lower case
    std::string fileExtension = filePath.extension().string();
    boost::to_lower(fileExtension);

    // Check if the file extension matches one of the valid ones
    if (std::find(validExtensions.begin(), validExtensions.end(), fileExtension) != validExtensions.end())
    {
        return true;
    }
    else
    {
        return false;
    }
}

Watermarker.h

#pragma once

#include <iostream>

class Watermarker
{
public:
    void mark(std::string& targetDirectory, std::string& watermarkPath);
};

Watermarker.cpp

#include "Watermarker.h"
#include "FileSystem.h"
#include <boost/filesystem.hpp>
#include <opencv2/core.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>

void Watermarker::mark(std::string& targetDirectory, std::string& watermarkPath)
{
    boost::filesystem::path path;

    // Loop through all the files in the target directory
    for (auto& entry : boost::filesystem::directory_iterator(targetDirectory))
    {
        // Set the boost filesystem path to the path of the file
        path = entry.path();

        FileSystem fileSystem;
        
        // If the file is not valid, skip it
        if (!fileSystem.checkFile(path)) { continue; }

        // Get the original and watermark image
        cv::Mat image = cv::imread(path.string());
        cv::Mat watermarkImage = cv::imread(watermarkPath, cv::IMREAD_UNCHANGED);

        // Make the watermark image the same size as the original image
        cv::resize(watermarkImage, watermarkImage, image.size(), 0, 0, cv::InterpolationFlags::INTER_LINEAR);

        // Give the images 4 channels
        cv::cvtColor(image, image, cv::COLOR_RGB2RGBA);
        cv::cvtColor(watermarkImage, watermarkImage, cv::COLOR_RGB2RGBA);

        cv::Mat newImage;

        // Add the watermark to the original image
        cv::addWeighted(watermarkImage, 0.3, image, 1, 0.0, newImage);

        // Save the new image to the new watermarked_images folder
        cv::imwrite(std::string(targetDirectory + "\watermarked_images\" + path.filename().string()).c_str(), newImage);
    }
}

macos – Add page numbers using print dialog box’s “watermark” tool

In most applications, such as preview, the print dialog box has a watermark feature. It is possible to open a PDF document and watermark it e.g. bottom right with a text and print it again back in to a new PDF.
print dialog box
Is it possible / is there a hidden feature that allows inserting page numbers / total number of pages in the watermark field, where it is automatically replaced by corresponding numbers at the time of printing?

licensing – Is using image found on google (without watermark) and turning it into pixel art with some filter would be illegal?

I’m working on AI collage generator with multiple png images from the internet (using google images search) and I wonder would my program break the law or not.
Program checks for watermark and omits images with watermarks.
The images will be pixelified like very much, even PNG image of a flower 1024×768 will be transformed into 16×16 pixelified image.

It’s like you type “barn with a sun and a horse on a field nearby” will create image with taken images from over the internet, but it will be like pixel art.

Generated images can be used by anyone, no matter the purpose.

plugins – How to add watermark to wordpress media images and then sending them to remote cdn

I’m using wordpress Image Watermark plugin to add watermark to images when uploading. then for moving theme to cdn, i use Hacklog Remote Attachment plugin to move my media images from wordpress upload directory with FTP. but the problem is watermark doesn’t apply when using this FTP plugin. I try coding my own FTP connection with php using wp_get_attachment_metadata filter but it moves images right after uploading to cdn and because of this, watermark does not apply. Does anyone have any way to do this with coding or plugin?

magento2 – Watermark issue – Magento Stack Exchange

Currently we are running on Magento 2.2.6.
We have added a watermark for the base, thumbnail, swatch & small.

The watermark is appearing on the productlist page, but not in a good manner, see image.

But the worse thing is, it isn’t even showing on the productdetail page. Yes I see the image but not a watermark. Herefore i’m searching a solution. The first issue will be related to this older version of magento we are running.

enter image description here

Hopefully anyone has some experience for this topic and thanks for the help.

Regards,
Pascal

Regards,
Pascal

Watermark text-on-text repeated diagonally css/html (and possibly javascript)

How does one achieve a text-on-text watermark in HMTL and CSS? If adding javascript makes it cleaner, that is acceptable. I’m OK with writing HTML and simple CSS, but this would be my first foray into javascript.

The answers to this earlier question seemed to assume that the foreground was a single “img”. But my question is for when the foreground is multi-paragraph text.

The foreground text could be quite large, say, 100 lines in several paragraphs.

The short background text, typically one word “Draft”, and preferably diagonally, as in that earlier question, should be specified just once and repeated arbitrarily.

Showing how to implement that earlier question’s posed illustration using two “p” paragraphs for the foreground “Text Watermark” and “For Blogger” would be ideal (no need to worry here about the formatting within those paragraphs). Or take this question itself and put a repeated diagonal background text “Draft” behind it.

Thanks.

App Windows – Video Watermark Subtitle Creator Professional Edition v4.0.5.1 x64 | NulledTeam UnderGround

Video Watermark Subtitle Creator is an best video watermark software for editing video, adding watermark and subtitle, It can add video, image, words and subtitle in WYSIWYG, and can set time of appearance, position, size and animated effects for watermark and subtitle to video, and preview at will. It can add watermark and subtitle to videos in batch, splitting and merging video in batch.

Features:
Put watermarks to videos in batch
1. Edit WordArt effects in WYSIWYG.
2. Create dynamic watermark effects (e.g. Expand, Scroll, Flash and Fade In).
3. Insert coypright symbols C, R or TM to video.
4. watermarks (video,pictures, text).

Add subtitles to videos in batch
1.Edit subtitle in WYSIWYG.
2.Create dynamic subtitle effects (e.g. Expand, Scroll, Flash and Fade In).
3.Add .srt or .ssa subtitles to videos.

Split video in batch
1.Set number of parts or a duration of each clip.
2.Set start and end points for every part.

Resize videos in batch
1.Video resizing serves the same purpose as splitting. Video resized or video spilting.

Merge videos in batch
1.Add title sequence to videos in batch.
2.Add tail leader to vides in batch.

Convert videos in batch
1.Support multi-core processor and concurrent conversion of multiple files.

Extract sounds from videos in batch
1. Convert videos to mp3
2. Merge multiple mp3 files into one.
3. Split an MP3 into multiple MP3s.

System Requirements: Windows 7, 8, 10 (64 bit)