smurf
This commit is contained in:
parent
2dee5b85cb
commit
648d38df1a
2 changed files with 7 additions and 2 deletions
|
|
@ -191,7 +191,12 @@ public class DirectoryEntry extends Entry {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd-HHmmss");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd-HHmmss");
|
||||||
NumberFormat nf = new DecimalFormat("0");
|
NumberFormat nf = new DecimalFormat("0");
|
||||||
|
|
||||||
Metadata metadata = JpegMetadataReader.readMetadata(f);
|
Metadata metadata;
|
||||||
|
try {
|
||||||
|
metadata = JpegMetadataReader.readMetadata(f);
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException("problem reading file " + f.getPath(), e);
|
||||||
|
}
|
||||||
Directory exifDirectory = metadata.getDirectory(ExifDirectory.class);
|
Directory exifDirectory = metadata.getDirectory(ExifDirectory.class);
|
||||||
if (exifDirectory.containsTag(ExifDirectory.TAG_ORIENTATION)) {
|
if (exifDirectory.containsTag(ExifDirectory.TAG_ORIENTATION)) {
|
||||||
int orientation = exifDirectory.getInt(ExifDirectory.TAG_ORIENTATION);
|
int orientation = exifDirectory.getInt(ExifDirectory.TAG_ORIENTATION);
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ public class PictureScaler {
|
||||||
|
|
||||||
public PictureScaler() {
|
public PictureScaler() {
|
||||||
queue = new PriorityBlockingQueue<PictureRequest>(20, createPriorityComparator());
|
queue = new PriorityBlockingQueue<PictureRequest>(20, createPriorityComparator());
|
||||||
executor = Executors.newSingleThreadExecutor();
|
executor = Executors.newFixedThreadPool(4);
|
||||||
outstandingRequests = new HashMap<String, PictureRequest>();
|
outstandingRequests = new HashMap<String, PictureRequest>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue