# Exif Orientation Tag and Smart Downloads

DevFeed: [Exif Orientation Tag and Smart Downloads](<https://devfeed.tech/articles/exif-orientation-tag-and-smart-downloads-19295.md>)

Original publisher: [Read original article](<https://www.codenameone.com/blog/exif-orientation-automatic-captured-image-rotation/>)

Author: Shai Almog

Published: 2020-07-02T00:00:00Z

Content type: article

Language: en

Sources: [CodeName One](<https://devfeed.tech/sources/codename-one.md>)

Topics: [API](<https://devfeed.tech/topics/api.md>), [HTTP](<https://devfeed.tech/topics/http.md>), [Android](<https://devfeed.tech/topics/android.md>), [web applications](<https://devfeed.tech/topics/web-applications.md>), [Spring Boot](<https://devfeed.tech/topics/spring-boot.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [api](<https://devfeed.tech/tags/api.md>), [apis](<https://devfeed.tech/tags/apis.md>), [automatic](<https://devfeed.tech/tags/automatic.md>), [camera](<https://devfeed.tech/tags/camera.md>), [capture](<https://devfeed.tech/tags/capture.md>), [code](<https://devfeed.tech/tags/code.md>), [devices](<https://devfeed.tech/tags/devices.md>), [http](<https://devfeed.tech/tags/http.md>), [images](<https://devfeed.tech/tags/images.md>), [internet](<https://devfeed.tech/tags/internet.md>), [iphone](<https://devfeed.tech/tags/iphone.md>), [network](<https://devfeed.tech/tags/network.md>), [samsung](<https://devfeed.tech/tags/samsung.md>), [server](<https://devfeed.tech/tags/server.md>), [servers](<https://devfeed.tech/tags/servers.md>), [spring-boot](<https://devfeed.tech/tags/spring-boot.md>), [video](<https://devfeed.tech/tags/video.md>)

## AI overview

The article explains how to handle EXIF orientation tags so captured images display correctly across devices. It also introduces Codename One's Util.downloadUrlSafely API, which can resume interrupted downloads when the server supports partial HTTP downloads.

## Source excerpt

On some devices, Capture APIs return images with the correct orientation, meaning that they do not need to be changed to display correctly; on other devices, they return images with a fixed orientation and an EXIF tag that indicates how they must be rotated or flipped to display correctly. More precisely, the Orientation Tag indicates the orientation of the camera with respect to the captured scene and can take a value from 0 to 8, as illustrated on the page Exif Orientation Tag. For testing purposes, you can download landscape and portrait images with all possible orientation values from the EXIF Orientation-flag example images repository.