Resize images, and pad them to give an exact size image
Project description
PyResizeImage Copyright (C) 2013 Alkatron
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions; use -w options for details.
---------------------------------------------------------------------------
Resize images, and pad them to give an exact size image.
If not specified it creates a new folder named resized.<width>.<height> and copies
resized images into it with the same name.
- Images with a different aspect-ratio are padded with alpha channel(transparent).
- Images resized are in PNG format (to mantain transparent channel).
Module usage:
from pyrszimg.core import resize_img, resize_dir, VVERSION
ResizedImage = resize_img(sourcefile, size)
or
dictResults=resize_dir(sourcedir, size [,destdir ,formats])
with dictResults={'total':<ImageFiles found (integer)>
'skipped':<ImageFiles skipped (integer)>
'path_to':<destdir (string))>}
---------------------------------------------------------------------------
Console usage: pyresizeimage [options]
Options:
-i, --input :Folder containing images to resize
-s, --size :Size of the producted images width/height
-o, --output :(optional)Folder containing resized images default is
<InputFolder>/resized.<width>.<height>
-f, --formats :(optional)Image format to evaluate default is png/gif/jpg/jpeg
-w :Show licence
Example:pyresizeimage -i ~/images -s 640/480
pyresizeimage -i ~/images -s 640/480 -o ~/images/newpic -f gif/jpg
Install
-------
sudo pip install PIL
sudo pip install pyresizeimage
This program comes with ABSOLUTELY NO WARRANTY;
This is free software, and you are welcome to redistribute it
under certain conditions; use -w options for details.
---------------------------------------------------------------------------
Resize images, and pad them to give an exact size image.
If not specified it creates a new folder named resized.<width>.<height> and copies
resized images into it with the same name.
- Images with a different aspect-ratio are padded with alpha channel(transparent).
- Images resized are in PNG format (to mantain transparent channel).
Module usage:
from pyrszimg.core import resize_img, resize_dir, VVERSION
ResizedImage = resize_img(sourcefile, size)
or
dictResults=resize_dir(sourcedir, size [,destdir ,formats])
with dictResults={'total':<ImageFiles found (integer)>
'skipped':<ImageFiles skipped (integer)>
'path_to':<destdir (string))>}
---------------------------------------------------------------------------
Console usage: pyresizeimage [options]
Options:
-i, --input :Folder containing images to resize
-s, --size :Size of the producted images width/height
-o, --output :(optional)Folder containing resized images default is
<InputFolder>/resized.<width>.<height>
-f, --formats :(optional)Image format to evaluate default is png/gif/jpg/jpeg
-w :Show licence
Example:pyresizeimage -i ~/images -s 640/480
pyresizeimage -i ~/images -s 640/480 -o ~/images/newpic -f gif/jpg
Install
-------
sudo pip install PIL
sudo pip install pyresizeimage
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PyResizeImage-0.9.6.tar.gz
(17.2 kB
view details)
File details
Details for the file PyResizeImage-0.9.6.tar.gz.
File metadata
- Download URL: PyResizeImage-0.9.6.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
36adbefd99b68256f9974c91b7c2ab6f2116f29c37cef0280849337f35ab3715
|
|
| MD5 |
147f40977336d30013b164c322aefca0
|
|
| BLAKE2b-256 |
bb882275908c372af8b0365b08704175b3462eafcf48cac205c412c901d34b96
|