Generate multiple resolution images of the given image.


    @param image: a Python Library Image (PIL) instance to generate
       multiple pixel resolutions from.

    @param pixel_resolutions: a list of tuples  ``(logical_size, width, height)``
        where:

        * ``logical_size``: string representation of the image size, such
          as, for instance, "thumbnail", "small", "medium", "large".

        * ``width``: positive integer corresponding to the number of pixel
          columns of the image.

        * ``height``: positive integer corresponding to the number of
          pixel rows.

    @param filter: indicate the filter to use when resizing the image.

    @param does_crop: indicate whether to crop each generated images.

    @param crop_alignment: if the image needs to be cropped, select which
        alignment to use when cropping.

    @param match_orientation: indicate whether the given canvas size
        should be inverted to match the orientation of the image.


    @return: an iterator, known as a generator, that returns a Python
             Library Image (PIL) instance each the generator is called.

def generate_multiple_pixel_resolutions(image, pixel_resolutions,
        filter=Filter.NearestNeighbor,
        does_crop=False,
        crop_aligment=CropAlignment.center,
        match_orientation=False):
    """
    Generate multiple resolution images of the given image.


    @param image: a Python Library Image (PIL) instance to generate
       multiple pixel resolutions from.

    @param pixel_resolutions: a list of tuples  ``(logical_size, width, height)``
        where:

        * ``logical_size``: string representation of the image size, such
          as, for instance, "thumbnail", "small", "medium", "large".

        * ``width``: positive integer corresponding to the number of pixel
          columns of the image.

        * ``height``: positive integer corresponding to the number of
          pixel rows.

    @param filter: indicate the filter to use when resizing the image.

    @param does_crop: indicate whether to crop each generated images.

    @param crop_alignment: if the image needs to be cropped, select which
        alignment to use when cropping.

    @param match_orientation: indicate whether the given canvas size
        should be inverted to match the orientation of the image.


    @return: an iterator, known as a generator, that returns a Python
             Library Image (PIL) instance each the generator is called.
    """
    for (logical_size, width, height) in \
            sorted(pixel_resolutions, key=lambda (l, w, h): w, reverse=True):
        yield (logical_size,
            resize_image(image, (width, height),
                filter=filter,
                does_crop=does_crop,
                crop_aligment=crop_aligment,
                match_orientation=match_orientation))