check whether a JPG is completed?

Discussion in 'Python' started by oyster, Dec 20, 2008.

  1. oyster

    oyster Guest

    there are some pics(most of them are JPGs) on my disk, but some are
    not completed, that is to say, if I view it in irfanview, the bottom
    is displayed as a gray block.
    so I want to check where they are completed. but how to do that in python?

    (No, I am not saying "how to tell the fileszie when I download a file
    from internet")

    thanx
     
    oyster, Dec 20, 2008
    #1
    1. Advertising

  2. Hi!

    Sometimes, PIL give an error. With "try: Except:", you can get info.
    Sometimes, non error, but the Jpeg is not correct. Difficult, in this
    case, to get info.
    Therefore, the answer is: "not in all cases".

    @-salutations
    --
    Michel Claveau
     
    Méta-MCI \(MVP\), Dec 20, 2008
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Roland
    Replies:
    0
    Views:
    1,095
    Roland
    May 12, 2004
  2. Matthias
    Replies:
    5
    Views:
    461
    Whitecrest
    Jun 1, 2004
  3. Yannick

    ASP changes Big JPG -> Small JPG

    Yannick, Feb 2, 2004, in forum: ASP General
    Replies:
    6
    Views:
    170
    Tim Williams
    Feb 3, 2004
  4. Vilmar Brazão de Oliveira
    Replies:
    14
    Views:
    377
    Aaron Bertrand [MVP]
    Mar 5, 2004
  5. Replies:
    0
    Views:
    109
Loading...

Share This Page