Skip to content

Commit

Permalink
make read buffer size for large RAW images configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
cpesch committed Apr 2, 2024
1 parent 233977a commit a839bcd
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.commons.imaging.formats.tiff.write.TiffOutputSet;
import slash.common.type.CompactCalendar;
import slash.navigation.base.*;
import slash.navigation.bcr.BcrFormat;
import slash.navigation.common.NavigationPosition;

import java.awt.*;
Expand All @@ -44,6 +45,7 @@
import java.util.Calendar;
import java.util.List;
import java.util.logging.Logger;
import java.util.prefs.Preferences;

import static java.io.File.createTempFile;
import static java.lang.Integer.parseInt;
Expand Down Expand Up @@ -76,11 +78,13 @@
*/
public class PhotoFormat extends SimpleFormat<Wgs84Route> {
private static final Logger log = Logger.getLogger(PhotoFormat.class.getName());
private static final Preferences preferences = Preferences.userNodeForPackage(PhotoFormat.class);

private static final String DATE_FORMAT = "yyyy:MM:dd";
private static final String DATE_TIME_FORMAT = "yyyy:MM:dd HH:mm:ss";
private static final DecimalFormat XX_FORMAT = new DecimalFormat("00");
private static final DecimalFormat XXXX_FORMAT = new DecimalFormat("0000");
private static final int READ_BUFFER_SIZE = 128 * 1024;
private static final int READ_BUFFER_SIZE = preferences.getInt("readBufferSize", 128 * 1024);

public String getName() {
return "Photo (" + getExtension() + ")";
Expand Down

0 comments on commit a839bcd

Please sign in to comment.