Package 

Class StreamCdnMaxPixelsImageResizer

  • All Implemented Interfaces:
    io.getstream.chat.android.ui.common.images.resizing.StreamCdnImageResizer

    
    public final class StreamCdnMaxPixelsImageResizer
     implements StreamCdnImageResizer
                        

    Caps images to maxImagePixels total pixels (default 2MP), preserving aspect ratio and never upscaling.

    • Method Summary

      Modifier and Type Method Description
      String resizeUrl(String imageUrl) Returns a (possibly) resized Stream CDN image URL for imageUrl.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StreamCdnMaxPixelsImageResizer

        StreamCdnMaxPixelsImageResizer(Long maxImagePixels, StreamCdnResizeImageMode resizeMode, StreamCdnCropImageMode cropMode, String cdnHost)
        Parameters:
        maxImagePixels - The total-pixel budget (width × height).
        resizeMode - The Stream CDN resize mode, or null for the CDN default.
        cropMode - The Stream CDN crop mode, or null for the CDN default.
        cdnHost - An optional custom Stream CDN host to resize in addition to the default Stream CDN hosts, for integrations serving Stream images from a proxied or custom domain.