Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions NonFreeImageResizer/littleimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ def gimme_image(filename,compound_site,pxl,theimage):
original_pixel = img.size[0] * img.size[1]
modified_pixel = basewidth * hsize
pct_chg = 100.0 * (original_pixel - modified_pixel) / float(original_pixel)
if pct_chg > 5:
if pct_chg > 37.5:
png_info = img.info
img = img.resize((int(basewidth),int(hsize)), Image.ANTIALIAS)
img.save(filename + extension, **png_info)
else:
print "Looks like we'd have a less than 5% change in pixel counts. Skipping."
print "Looks like we'd have a less than 37.5% change in pixel counts. Skipping."
results = "PIXEL"
return results
except (IOError):
Expand Down