Different ways of resizing pictures in OpenCV
pip install a-cv2-easy-resize
from a_cv2_easy_resize import add_easy_resize_to_cv2
from a_cv_imwrite_imread_plus import add_imwrite_plus_imread_plus_to_cv2
add_imwrite_plus_imread_plus_to_cv2()
add_easy_resize_to_cv2()
import cv2
pic = cv2.imread_plus(r"https://raw.githubusercontent.com/hansalemaos/screenshots/main/splitted1.jpeg")
pic1 = cv2.easy_resize_image(
pic.copy(), width=200, height=None, percent=None, interpolation=cv2.INTER_AREA
)
pic2 = cv2.easy_resize_image(
pic.copy(), width=None, height=200, percent=None, interpolation=cv2.INTER_AREA
)
pic3 = cv2.easy_resize_image(
pic.copy(), width=100, height=200, percent=None, interpolation=cv2.INTER_AREA
)
pic4 = cv2.easy_resize_image(
pic.copy(), width=None, height=None, percent=40, interpolation=cv2.INTER_AREA
)
pic5 = cv2.easy_resize_image(
pic.copy(), width=None, height=None, percent=None, interpolation=cv2.INTER_AREA
) # returns original
cv2.imwrite('f:\\papagei\\pic1.png', pic1)
cv2.imwrite('f:\\papagei\\pic2.png', pic2)
cv2.imwrite('f:\\papagei\\pic3.png', pic3)
cv2.imwrite('f:\\papagei\\pic4.png', pic4)
cv2.imwrite('f:\\papagei\\pic5.png', pic5)
Release files for a-cv2-easy-resize 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| a_cv2_easy_resize-0.10.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| a_cv2_easy_resize-0.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:9.0 kB
Release files / a_cv2_easy_resize-0.10.tar.gz
| Download URL | a_cv2_easy_resize-0.10.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3156b97cac7bae0db9cb7a50d98e9bd85fd15d38d3f1942f3accdc1e4d60634d
|
|
BLAKE2b-256 checksum How to use checksums |
7d49f98d4b2aa3bcf2f2664ad28f0cdc5df5c02ff3921262f55983d3c2250a40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / a_cv2_easy_resize-0.10-py3-none-any.whl
| Download URL | a_cv2_easy_resize-0.10-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac5d0ee0cd428100b83d2760673b90d4c392945514dd4694e2ac69956c234ae7
|
|
BLAKE2b-256 checksum How to use checksums |
19203fbda986be3afa540b80fbf3d27cff3d73a8ebc9b97f0d96bdc205f80377
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|