Parameters: *Filename, *Type: Thge type of blur, intensity
Type: simple, box or Gaussian
import main as upimage = up.Pillow.rotate('filename.jpg',45)#filename, degreesimage.show()
import main as upimage = up.Pillow.blur('filename.png','gaussian',3)#filename, type, intesityimage.show()
Do not forget the parenthesis! Use '()' after every method! If you simply use Pillow.rotate, it won't work! You need to use Pillow.rotate(parameters)
Watermarks
Basic Watermark
name: basic_watermark
parameters: *filename, *text: The text you want the watermark to contain, *font: The font name and size.
Note: With basic_watermark, you cannot customize the color or the position of the text. If you need to customize them, view watermark instead.
Watermark
name: watermark
parameters: *filename, *text: The text you want the watermark to contain, *font: The font name and size, fontcolor: The color and opacity of the font in RBG format. Eg. '255, 0, 0, 255' (red, blue, green, opacity), margin: The space between the text and the bottom right corner.
Crop, Flip and Resize
Crop
name: crop
parameters: filename, left: The space from the center to the left you want to crop, right: vice versa, upper: The space from the center to the top you want to crop, lower: vice versha
Flip
name: flip
parameters: filename, flip: How you want to flip the file, eg. Horizontal, Vertical, both
Resize
name: resize
parameters: filename, percentage: Reduce the file size to this percentage. Rmember to provide an integer, eg. '250', not '250%'.
import main as up
image = up.Pillow.basic_watermark('filename.png', 'My Watermark', 'arial.ttf, 36')
image.show()
import main as up
image = up.Pillow.watermark('filename.png', 'watermark', 'arial.ttf, 25', '255, 255, 255, 255', 120) #filename, text, font, fontcolor, margin
image.show() #view the result.
import main as up
image = up.Pillow.crop('filename.png', 100, 100, 200, 100) #filename, left, right, upper, lower
image.show() # view the cropped image
import main as up
image = up.Pillow.flip('filename.png', 'vertical') #filename, flip
image.show() #view the image
import main as up
image = up.Pillow.resize('filename.png', 50) #filename, width, height. This will reduce the image's size to 50%.
image.show() # Open the image.