cv2watermark


Namecv2watermark JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/cv2watermark
SummaryPuts watermark on images using relative or absolute coordinates.
upload_time2022-12-29 01:17:26
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords watermark cv2
VCS
bugtrack_url
requirements a_cv2_easy_resize a_cv_imwrite_imread_plus opencv_python
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Puts watermark on images using relative or absolute coordinates. 

```python

from cv2watermark import (
    merge_image_percentage_height,
    merge_image_percentage_width,
    merge_image_percentage_height_position,
    merge_image_percentage_width_position,
    merge_image,
)

# Allowed image formats: url/path/buffer/base64/PIL/np
i2 = r"https://www.python.org/static/img/psf-logo.png"  # Transparent image from URL doesn't work! You have to download it before
i2 = r"F:\neuedownloads\psf-logo.png"
i1 = r"https://github.com/hansalemaos/screenshots/raw/main/splitted1.png"  

merg1 = merge_image(
    back=i1, front=i2, x=10, y=30, save_path="f:\\cv2mergepics\\merg1.png"
)

```

<img src="https://github.com/hansalemaos/screenshots/raw/main/merg1.png"/>


```python


merg2 = merge_image_percentage_width(
    back=i1,
    front=i2,
    x=10,
    y=30,
    front_percentage_width=80,
    save_path="f:\\cv2mergepics\\merg2.png",
)


```

<img src="https://github.com/hansalemaos/screenshots/raw/main/merg2.png"/>


```python


merg3 = merge_image_percentage_width_position(
    back=i1,
    front=i2,
    percentx=50,
    percenty=60,
    front_percentage_width=30,
    save_path="f:\\cv2mergepics\\merg3.png",
)

```

<img src="https://github.com/hansalemaos/screenshots/raw/main/merg3.png"/>


```python



merg4 = merge_image_percentage_width(
    back=i1,
    front=i2,
    x=110,
    y=10,
    front_percentage_width=60,
    save_path="f:\\cv2mergepics\\merg4.png",
)

```

<img src="https://github.com/hansalemaos/screenshots/raw/main/merg4.png"/>


```python


merg5 = merge_image_percentage_width_position(
    back=i1,
    front=i2,
    percentx=50,
    percenty=10,
    front_percentage_width=40,
    save_path="f:\\cv2mergepics\\merg5.png",
)

```

<img src="https://github.com/hansalemaos/screenshots/raw/main/merg5.png"/>


```python


merg6 = merge_image_percentage_height(
    back=i1,
    front=i2,
    x=20,
    y=50,
    front_percentage_height=40,
    save_path="f:\\cv2mergepics\\merg6.png",
)


```

<img src="https://github.com/hansalemaos/screenshots/raw/main/merg6.png"/>


```python
merg7 = merge_image_percentage_height_position(
    back=i1,
    front=i2,
    percentx=20,
    percenty=40,
    front_percentage_height=40,
    save_path="f:\\cv2mergepics\\merg7.png",
)



```

<img src="https://github.com/hansalemaos/screenshots/raw/main/merg7.png"/>


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/cv2watermark",
    "name": "cv2watermark",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "watermark,cv2",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/07/06/b7a9709265f91396a769f21942e6530afef854d963c6cc0e6875a0cae7d8/cv2watermark-0.10.tar.gz",
    "platform": null,
    "description": "\n# Puts watermark on images using relative or absolute coordinates. \n\n```python\n\nfrom cv2watermark import (\n    merge_image_percentage_height,\n    merge_image_percentage_width,\n    merge_image_percentage_height_position,\n    merge_image_percentage_width_position,\n    merge_image,\n)\n\n# Allowed image formats: url/path/buffer/base64/PIL/np\ni2 = r\"https://www.python.org/static/img/psf-logo.png\"  # Transparent image from URL doesn't work! You have to download it before\ni2 = r\"F:\\neuedownloads\\psf-logo.png\"\ni1 = r\"https://github.com/hansalemaos/screenshots/raw/main/splitted1.png\"  \n\nmerg1 = merge_image(\n    back=i1, front=i2, x=10, y=30, save_path=\"f:\\\\cv2mergepics\\\\merg1.png\"\n)\n\n```\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/merg1.png\"/>\n\n\n```python\n\n\nmerg2 = merge_image_percentage_width(\n    back=i1,\n    front=i2,\n    x=10,\n    y=30,\n    front_percentage_width=80,\n    save_path=\"f:\\\\cv2mergepics\\\\merg2.png\",\n)\n\n\n```\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/merg2.png\"/>\n\n\n```python\n\n\nmerg3 = merge_image_percentage_width_position(\n    back=i1,\n    front=i2,\n    percentx=50,\n    percenty=60,\n    front_percentage_width=30,\n    save_path=\"f:\\\\cv2mergepics\\\\merg3.png\",\n)\n\n```\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/merg3.png\"/>\n\n\n```python\n\n\n\nmerg4 = merge_image_percentage_width(\n    back=i1,\n    front=i2,\n    x=110,\n    y=10,\n    front_percentage_width=60,\n    save_path=\"f:\\\\cv2mergepics\\\\merg4.png\",\n)\n\n```\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/merg4.png\"/>\n\n\n```python\n\n\nmerg5 = merge_image_percentage_width_position(\n    back=i1,\n    front=i2,\n    percentx=50,\n    percenty=10,\n    front_percentage_width=40,\n    save_path=\"f:\\\\cv2mergepics\\\\merg5.png\",\n)\n\n```\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/merg5.png\"/>\n\n\n```python\n\n\nmerg6 = merge_image_percentage_height(\n    back=i1,\n    front=i2,\n    x=20,\n    y=50,\n    front_percentage_height=40,\n    save_path=\"f:\\\\cv2mergepics\\\\merg6.png\",\n)\n\n\n```\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/merg6.png\"/>\n\n\n```python\nmerg7 = merge_image_percentage_height_position(\n    back=i1,\n    front=i2,\n    percentx=20,\n    percenty=40,\n    front_percentage_height=40,\n    save_path=\"f:\\\\cv2mergepics\\\\merg7.png\",\n)\n\n\n\n```\n\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/merg7.png\"/>\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Puts watermark on images using relative or absolute coordinates.",
    "version": "0.10",
    "split_keywords": [
        "watermark",
        "cv2"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "d0e3b495eebe18ae7de53899e8d2e23f",
                "sha256": "fdb62f9279d77f1497a71253852382421caa309d3090e0e1e990c94f764b5b98"
            },
            "downloads": -1,
            "filename": "cv2watermark-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d0e3b495eebe18ae7de53899e8d2e23f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5530,
            "upload_time": "2022-12-29T01:17:24",
            "upload_time_iso_8601": "2022-12-29T01:17:24.547274Z",
            "url": "https://files.pythonhosted.org/packages/34/cf/d320310047b0c60bb53e1d87aac5d8759159e80e73962d18fa55c4a7973d/cv2watermark-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "99cde83cb3096598c4a784a114d9d3f4",
                "sha256": "e625d33de90454be296f309b89a0a22d96708d0caeb36cebd09bd5878c226cdf"
            },
            "downloads": -1,
            "filename": "cv2watermark-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "99cde83cb3096598c4a784a114d9d3f4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4167,
            "upload_time": "2022-12-29T01:17:26",
            "upload_time_iso_8601": "2022-12-29T01:17:26.068566Z",
            "url": "https://files.pythonhosted.org/packages/07/06/b7a9709265f91396a769f21942e6530afef854d963c6cc0e6875a0cae7d8/cv2watermark-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-29 01:17:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hansalemaos",
    "github_project": "cv2watermark",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "a_cv2_easy_resize",
            "specs": []
        },
        {
            "name": "a_cv_imwrite_imread_plus",
            "specs": []
        },
        {
            "name": "opencv_python",
            "specs": []
        }
    ],
    "lcname": "cv2watermark"
}
        
Elapsed time: 0.08804s