Overview
Two types of Image Compression are used in this smart service:
Key Features & Functionality
Note: Any type of image compression or resizing will have slight loss in Image Quality.
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 vigneshe - 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: 3000Wx4000Hfile size: 3.16 MB (3,314,598 bytes)extension: jpgHorizontal/Vertical resolution: 150dpi
Hi aldousemersong0331 ,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