There's more...

There are few more methods available as the image utilities. The following is a list of methods and how they are used:

  • image_resize_image(): This method is used to resize images from base64 sources.
  • image_resize_and_sharpen(): Creating thumbnails sometimes makes images blurry. In these cases, you can use this function to make better-looking images by sharpening them.
  • image_save_for_web(): This function is used to optimize image sizes for a website. This will reduce the image size without compromising their quality.
  • crop_image(): This method is used to crop images to different sizes.
  • image_colorize(): This method is used to colorize the transparent part of an image.

If you want to learn more about these methods, take look at odoo/tools/image.py.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset