146 | | #if NEW_LIB_EXIF |
147 | | exif_entry_get_value(entry, exifvalue, 1023); |
148 | | QString value = exifvalue; |
149 | | #else |
150 | | QString value = exif_entry_get_value(entry); |
151 | | #endif |
152 | | if (value == "left - bottom") |
| 148 | ExifShort v_short = exif_get_short (entry->data, o); |
| 149 | VERBOSE(VB_GENERAL, QString("Exif entry=%1").arg(v_short)); |
| 150 | /* From http://sylvana.net/jpegcrop/exif_orientation.html |
| 151 | Read this table as follows |
| 152 | Entry #6 in the table says that the 0th row in the stored image is the right side of the captured scene, and the 0th column in the stored image is the top side of the captured scene. |
| 153 | Example left bottom means (L stands for Left side of real picture and B for bottom): |
| 154 | Stored picture |
| 155 | LLLLLLLLLL |
| 156 | B | |
| 157 | B | |
| 158 | B | |
| 159 | B--------+ |
| 160 | That is the real picture is |
| 161 | L-----+ |
| 162 | L | |
| 163 | L | |
| 164 | L | |
| 165 | L | |
| 166 | L | |
| 167 | LBBBBBB |
| 168 | |
| 169 | So this means a rotate angle of -90 degrees from the natural orientation |
| 170 | and so on... |
| 171 | Value 0th Row 0th Column |
| 172 | 1 top left side |
| 173 | 2 top right side |
| 174 | 3 bottom right side |
| 175 | 4 bottom left side |
| 176 | 5 left side top |
| 177 | 6 right side top |
| 178 | 7 right side bottom |
| 179 | 8 left side bottom |
| 180 | */ |
| 181 | /* We are only interested in "normal" mis-orientation |
| 182 | that is you took the picture handing your camera |
| 183 | rotated to take portrait */ |
| 184 | if (v_short == 8) |