#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2005
    Posts
    174
    Rep Power
    11

    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!

    Cheers
    sf2k
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2004
    Location
    Regensburg, Germany
    Posts
    147
    Rep Power
    16
    Have a look at the python imaging library at http://www.pythonware.com/products/pil/.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2004
    Location
    Albuquerque, New Mexico
    Posts
    137
    Rep Power
    11
    well, you could find out how many blank pixels it takes to make 100k, 1M, etc, then use something like this:
    Code:
    import Image
     img = Image.new("RGB", (300, 300))
     print img.save("test.jpeg")
    replace 300, 300 with how many pixels it is. it should save it as test.jpeg in the current working directory.

IMN logo majestic logo threadwatch logo seochat tools logo