Updated README and removed the redunant for loop
This commit is contained in:
@@ -13,4 +13,5 @@ I'm a photographer. I regularly need to save jpegs for web. This is a python scr
|
|||||||
|
|
||||||
1. Run `convert.py`
|
1. Run `convert.py`
|
||||||
* This will download ImageMagick into the imagemagick folder.
|
* This will download ImageMagick into the imagemagick folder.
|
||||||
* This convert files into the web-files folder.
|
* This will convert files into the web-files folder.
|
||||||
|
* This will convert files into the high-res folder for customer delivery.
|
||||||
@@ -24,10 +24,9 @@ def convertFilesInInput():
|
|||||||
print("Converting " + filename + " for web.")
|
print("Converting " + filename + " for web.")
|
||||||
convertImage("1500","50",filename,getOutputPath())
|
convertImage("1500","50",filename,getOutputPath())
|
||||||
|
|
||||||
for filename in os.listdir(inputFolder):
|
|
||||||
print("Converting " + filename + " for delivery.")
|
print("Converting " + filename + " for delivery.")
|
||||||
# 6000x can give you a 20 inch image for print. Printing is 300dpi so 6000px/300dpi = 20inch, but if someone wants a 20x16 your smaller edge needs to be 4800px
|
# 6000x can give you a 20 inch image for print. Printing is 300dpi so 6000px/300dpi = 20inch, but if someone wants a 20x16 your smaller edge needs to be 4800px
|
||||||
convertImage("8000","50",filename,getOutputPathHighRes())
|
convertImage("8000","50",filename,getOutputPathHighRes())
|
||||||
|
|
||||||
def convertImage(pixels,quality,filename,outputPath):
|
def convertImage(pixels,quality,filename,outputPath):
|
||||||
#os.path.splitext(filename)[0] gets rid of file extension if you want a different extension
|
#os.path.splitext(filename)[0] gets rid of file extension if you want a different extension
|
||||||
|
|||||||
Reference in New Issue
Block a user