| 1 |
package org.sejda.impl.sambox.component; |
| 2 |
|
| 3 |
import static org.junit.Assert.assertEquals; |
| 4 |
|
| 5 |
import org.junit.Test; |
| 6 |
import org.sejda.model.input.StreamSource; |
| 7 |
|
| 8 |
public class ExifHelperTest { |
| 9 |
|
| 10 |
@Test |
| 11 |
public void getRotation() { |
| 12 |
StreamSource source = StreamSource.newInstance( |
| 13 |
getClass().getResourceAsStream("/image/with_exif_orientation.JPG"), "with_exif_orientation.JPG"); |
| 14 |
int rotation = ExifHelper.getRotationBasedOnExifOrientation(source); |
| 15 |
assertEquals(90, rotation); |
| 16 |
} |
| 17 |
} |