February 16th, 2005, 01:32 PM
python test image sizer for Bandwidth program?
I'm looking for a way to create a test image of a specific byte size for a bandwidth test.
Basically I'd like to take an image, and make it 100K then 1.024MB etc, filling in the bits until the image is that exact size. Just some kind of command liner or program?
I've seen this somewhere but I can't seem to google it correctly
This is going to lead up to another question to create a program that will satisfy the following:
User clicks on image
User downloads image
User gets (very) ruff estimate of their current download speed.
Any links/suggestions on any of this is quite welcome!
February 17th, 2005, 01:09 AM
February 21st, 2005, 02:56 AM
well, you could find out how many blank pixels it takes to make 100k, 1M, etc, then use something like this:
replace 300, 300 with how many pixels it is. it should save it as test.jpeg in the current working directory.
img = Image.new("RGB", (300, 300))