ImageCompressor

com.imcode.imcms.components

Methods

byte[] compressImage(byte[] image, Format imageFormat) throws CompressionImageException

Realization

com.imcode.imcms.components.impl.compressor.image.DefaultImageCompressor - ImageMagick utility.

com.imcode.imcms.components.impl.compressor.image.ResmushImageCompressor - Resmush external service.

com.imcode.imcms.components.impl.compressor.image.ImageOptimCompressor - ImageOptim external service.

How to get compressor that is used in system:

ImageCompressor imageCompressor = Imcms.getServices().getImageCompressor();