Add and use getImageFilePath

This commit is contained in:
Benjamin Loison 2024-05-03 02:27:07 +02:00
parent 514413e1dd
commit 790c0d6da4
No known key found for this signature in database

View File

@ -46,13 +46,17 @@ if type_ is not None:
minColor = None
maxColor = None
def getImageNpArray(imageFileName, computeExtremes, color):
global minColor, maxColor
def getImageFilePath(imageFileName):
if raiseNotFlatFields:
imageFileName = imageFileName.replace('.png', '.NEF')
imageFilePath = f'{imagesFolderPath}/nef/{imageFileName}'
else:
imageFilePath = f'{imagesFolderPath}/{imageFileName}'
return imageFilePath
def getImageNpArray(imageFileName, computeExtremes, color):
global minColor, maxColor
imageFilePath = getImageFilePath(imageFileName)
imageNpArray = getColorChannel(imageFilePath, color)
if computeExtremes: