Skip to content

Instantly share code, notes, and snippets.

@flxw
flxw / JpegRotation.java
Created April 22, 2020 23:08
Print the actually visible image resolution in accordance with the image's rotation tag
import com.drew.imaging.ImageMetadataReader;
import com.drew.metadata.Directory;
import com.drew.metadata.Metadata;
import com.drew.metadata.Tag;
import com.drew.metadata.exif.ExifSubIFDDirectory;
import org.apache.commons.imaging.ImageInfo;
import org.apache.commons.imaging.Imaging;
import java.io.File;
import java.util.Iterator;
docker create \
--name=lychee \
-v ~/.config/lychee/conf:/conf \
-v ~/lychee-uploads:/uploads \
-v ~/.config/lychee/sym:/sym \
-v ~/Pictures:/imagelib \
-e PUID=1000 \
-e PGID=1000 \
-e PHP_TZ=Europe/Berlin \
-e DB_CONNECTION=mysql \