def set_max_image_pixels(self, pixels):
        """Set PIL limit on pixel size of images to load if non-zero.

        WARNING: This is a global setting in PIL, it is
        not local to this manipulator instance!

        Setting a value here will not only set the given limit but
        also convert the PIL "DecompressionBombWarning" into an
        error. Thus setting a moderate limit sets a hard limit on
        image size loaded, setting a very large limit will have the
        effect of disabling the warning.
        """
        if (pixels):
            Image.MAX_IMAGE_PIXELS = pixels
            Image.warnings.simplefilter(
                'error', Image.DecompressionBombWarning)
Set PIL limit on pixel size of images to load if non-zero.

        WARNING: This is a global setting in PIL, it is
        not local to this manipulator instance!

        Setting a value here will not only set the given limit but
        also convert the PIL "DecompressionBombWarning" into an
        error. Thus setting a moderate limit sets a hard limit on
        image size loaded, setting a very large limit will have the
        effect of disabling the warning.