Image Compression

Overview

Two types of Image Compression are used in this smart service:

  • Image Resizing - Resizing an image typically involves changing the visual dimensions of the image. Such as converting an 1920x1080 image into 480x270 image thus reducing the size of image file
  • Image Compressing - Image Compression utilizes mathematical techniques to compress the image file size while maintaining the resolution of the image.

Key Features & Functionality

Note: Any type of image compression or resizing will have slight loss in Image Quality.

Anonymous
  • Hi - i'm using a utility I built using this smart service to compress and resize some images users uploaded after taking super-high-resolution images with their phones (and of course uploading them at full size).  Many of these images are intended to be vertical and displayed vertically due only to some metadata they contain.  This metadata is stripped out by the Compress Image smart service, leading the resulting images to revert to horizontal display mode, which is not exactly an intended result.  I should note that I don't know of any Appian utility to correct image rotation.

    The metadata is stored, at least in one example image I'm looking at, in the "Exif IFD0" entry under the "Raw Metadata" entry, for instance if using the "getfilemetadata" utility (from another plug-in) on the original image.  Inside that metadata block. there is an "Orientation" parameter, which in the example I'm looking at now, says "Right side, top (Rotate 90 CW)".  To confirm, the entire "Exif IFD0" metadata block is missing after the image has been passed through the Image Compression SS.

  • depending on the source, sometimes the image's apparent rotation (particularly vertical images from a normally-horizontal camera) is not actually stored in the image data, but stored in metadata (metadata that tells the viewer what orientation to show the image in, if not default).  I assume in some cases like these, running the image through a 3rd-party compression routine (like the appian smart service) could cause that metadata to be lost, thus causing the resulting image to show up apparently horizontal when the expectation was that it would be vertical.

  • I used a vertical image. I set up the max height and width to 700.
    No Quality factor.
    The image properties are such:

    dimensions: 3000Wx4000H
    file size: 3.16 MB (3,314,598 bytes)
    extension: jpg
    Horizontal/Vertical resolution: 150dpi

  • Hi  ,

    Thanks for reaching us!

    We can't reproduce the scenario you mentioned when attempting to compress the image; it doesn't rotate. Could you please share the steps to reproduce the issue you faced?


    Thanks,
    Vignesh E

  • Hi, Good day! Is there a scenario wherein the compressed image gets rotated? if so, how do I prevent it?

    I've set the dimensions as 500x500 which is definitely smaller than that of the image.

  • Hi @Simranji Singh,

    The latest release addresses the previously mentioned issue, resolving the indefinite loop within the smart service caused by improperly scoped dimensions. To ensure proper functionality, please configure the dimensions as outlined below.

    Thanks,
    Vignesh E

  • Hi Vignesh. I see a version was released yesterday, Can you please confirm if the issue has been addressed?

    Regarding your suggestion to specify target width and length to values smaller than the actual dimensions, what is the impact if the specified dimensions are bigger than the actuals?

  • Hi Simranjit,

    Thanks for reaching out!

    We've identified the root cause of the plugin running indefinitely and will address it in the next release. Please ensure that the specified target Width and Height are set to values smaller than the actual dimensions of the image.

    Thanks,
    Vignesh E

  • Can you please confirm if the issue mentioned by Mike below was addressed in the upgrade? I'm using the old version of the plugin and the server has crashed multiple times while compressing an image of a few Kbs in size.