Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

Commit

Permalink
exportImages(Par): use lowercase file extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
darkf committed Oct 25, 2015
1 parent 8f54cf3 commit 2952822
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion exportImages.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def main():
if not os.path.exists(dir):
os.mkdir(dir)

subdirFRMs = [glob.glob("%s/art/%s/*.FRM" % (DATA_DIR, subdir)) for subdir in subdirs]
subdirFRMs = [glob.glob("%s/art/%s/*.frm" % (DATA_DIR, subdir)) for subdir in subdirs]
totalNum = sum(len(x) for x in subdirFRMs)

if '--update' in sys.argv:
Expand Down
6 changes: 3 additions & 3 deletions exportImagesPar.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def convertFRX(task):
return ('art/'+name, frmpixels.exportFRMs(images, outpath, palette, exportImage))

def getFRMTasks(palette, dataDir, outDir, exportImage=True):
subdirFRMs = [glob.glob("%s/art/%s/*.FRM" % (dataDir, subdir)) for subdir in SUBDIRS]
subdirFRMs = [glob.glob("%s/art/%s/*.frm" % (dataDir, subdir)) for subdir in SUBDIRS]
#totalNum = sum(len(x) for x in subdirFRMs)

for subdirIdx,FRMs in enumerate(subdirFRMs):
Expand All @@ -46,15 +46,15 @@ def getFRMTasks(palette, dataDir, outDir, exportImage=True):
yield (name, FRM, outpath, palette, exportImage)

def getFRXTasks(palette, dataDir, outDir, exportImage=True):
subdirFRMs = [glob.glob("%s/art/%s/*.FR0" % (dataDir, subdir)) for subdir in SUBDIRS]
subdirFRMs = [glob.glob("%s/art/%s/*.fr0" % (dataDir, subdir)) for subdir in SUBDIRS]
#totalNum = sum(len(x) for x in subdirFRMs)

for subdirIdx,FRMs in enumerate(subdirFRMs):
subdir = SUBDIRS[subdirIdx]

for FRM in FRMs:
basename = os.path.splitext(os.path.basename(FRM))[0].lower()
images = glob.glob("%s/art/%s/%s.FR[0-5]" % (dataDir, subdir, basename))
images = glob.glob("%s/art/%s/%s.fr[0-5]" % (dataDir, subdir, basename))
#print "images:", images
# TODO: validate that images are ordered FR0 to FRn

Expand Down

0 comments on commit 2952822

Please sign in to comment.