1
votes

Our Web application receives image files from dozens of different third party sources. Business rules dictate that we save the original images as received, without any kind of image manipulation. We handle resizing, watermarking, rotation, etc. when an image is requested via a dedicated Web server for the images using ImageResizer. autorotate=true and copymetadata=true are defaults on the image server.

One of the third party sources handles image rotation questionably. When they initially receive the image, they honor the image's EXIF orientation data by rotating the image. However, they preserve the pre-rotated version of the EXIF orientation data. So when the image comes to us, it is rotated but the EXIF orientation flag still remains in the image. When the image is requested from our image server, the orientation flag is processed (via autorotate=true), with the resultant requested image being rotated again (appearing incorrect), and the EXIF orientation data removed. This results in unhappy users.

Convincing the third party to change how they handle the EXIF data is not an option.

A solution we are planning to use for these particular images is to set autorotate=false when requested. However, the EXIF orientation information would still be there. Since I don't see an ImageResizer option to remove only the EXIF orientation data (other than getting into the System.Drawing namespace, which we would rather not do), we are considering setting copymetadata=false for these particular images.

What is the downside to a Web server providing images with no metadata? Specifically regarding color space/profiles? These images end up being copied and used on other websites.

1

1 Answers

0
votes

ImageResizer doesn't copy any metadata or EXIF orientation data unless you tell it to. Setting &autorotate=false on those broken images will work fine.

Even if you are using CopyMetadata, it specifically excludes copying orientation data and other bitmap-specific numbers. Have you seen a scenario where an image requested with &autorotate=false later appeared further rotated in a viewer?

CopyMetadata is primarily useful for copying copyright and gps data. It does not handle XML or XMP metadata, nor does it copy color spaces - ImageResizer always outputs sRGB images, the internet default - no color space information required.