Skip to content

Commit

Permalink
Fix prefix 0s not correct for sequential file names starting at nonze…
Browse files Browse the repository at this point in the history
…ro index
  • Loading branch information
benjamin-owen committed Jul 16, 2021
1 parent 15d6c32 commit 67a0713
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ private static BufferedImage resize(BufferedImage img, int max_width) {
public void downloadImages(ArrayList<String> urls, String file_location, boolean rename, String prefix, String extension, int start_index, JProgressBar progress_bar, JPanel panel, JLabel status) {

// get number of digits of total image count
int prefixNum = (int) Math.log10(urls.size());
int prefixNum = (int) Math.log10(start_index + urls.size()); // (start_index + urls.size()) in order to add 0 when not starting at 0
System.out.println("prefixNum: " + prefixNum);

// loop through each index of image list
Expand Down

0 comments on commit 67a0713

Please sign in to comment.