Wand save() method in Python Last Updated : 22 Apr, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report Whenever we manipulate an image and want to preserve image for further image, we use save() function. save() function saves the image into the file or filename. It saves the final manipulated image in your disk. Syntax : Python3 # image manipulation code wand.image.save(file = file_object or filename='filename.format') Parameters : It has only two parameter and takes only one at a time. Parameter Input Type Description file file object a file object to write to the file parameter filename basestring a filename object to write to the file parameter Now let's see code to save image. Example #1: Save image to the disk. Python3 1== # import Image from wand.image module from wand.image import Image # read image using with Image(filename ='koala.png') as img: # manipulate image img.rotate(90 * r) # save final image after img.save(filename ='final.png') Output : In output an image named koala.png will be saved in disk Example #2: We can save image to output stream using save() function too. For example, the following code converts koala.png image into JPEG, gzips it, and then saves it to koala.jpg.gz: Python3 1== # import gzip import gzip # import Image from wand.image module from wand.image import Image # create gz compressed file gz = gzip.open('koala.jpg.gz') # read image using Image() function with Image(filename ='pikachu.png') as img: # get format of image img.format = 'jpeg' # save image to output stream using save() function img.save(file = gz) gz.close() Output : A compressed file named koala.jpg.gz get saved in disk Comment More infoAdvertise with us Next Article Python | Decimal scaleb() method R RahulSabharwal Follow Improve Article Tags : Python Image-Processing Python-wand Practice Tags : python Similar Reads Wand shade() function - Python The shade() function is an inbuilt function in the Python Wand ImageMagick library which is used to generates create a 3D effect by simulating a light from an elevated angle. Syntax: shade(gray, azimuth, elevation) Parameters: This function accepts three parameters as mentioned above and defined bel 2 min read Wand mode() function - Python The mode() function is an inbuilt function in the Python Wand ImageMagick library which is used to replace each pixel with the mathematical mode of the neighboring colors. Syntax: mode(width, height) Parameters: This function accepts two parameters as mentioned above and defined below: width: This p 2 min read Wand | path_vertical_line() in Python path_vertical_line() is another function for path. path_vertical_line() function generates a vertical line from a destination point to a particular y point. It takes only y point upto which line is being drawn. Syntax: wand.drawing.path_vertical_line(to, relative) Parameters: Parameter Input Type De 1 min read Python | Decimal scaleb() method Decimal#scaleb() : scaleb() is a Decimal class method which returns the first operand after adding the second value its exp. Syntax: Decimal.scaleb() Parameter: Decimal values Return: the first operand after adding the second value its exp. Code #1 : Example for scaleb() method Python3 # Python Prog 2 min read Wand sharpen() function - Python The sharpen() function is an inbuilt function in the Python Wand ImageMagick library which is used to sharpen the image. Syntax: sharpen(radius, sigma) Parameters: This function accepts four parameters as mentioned above and defined below: radius: This parameter stores the radius value of the sharpn 2 min read Wand rotate() function - Python The rotate() function is an inbuilt function in the Python Wand ImageMagick library which is used to rotates the image right. It takes a background color for which rotation is not available. Syntax: rotate(degree, background, reset_coords) Parameters: This function accepts three parameters as mentio 2 min read Like