pil bug?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John Smith

    pil bug?

    Hello, I don't know if this is a bug or not, but when you convert an image
    from one mode to another, the object's filename gets lost in the conversion
    process.

    for example:
    [color=blue][color=green]
    >>import Image
    >>im = Image.open('som eRGB.bmp')
    >>im.filename[/color][/color]
    'someRGB.bmp'[color=blue][color=green]
    >>im = im.convert('L')
    >>im.filename[/color][/color]

    error: no attribute called filename

    is this a bug?

    The simple solution is to assign a new attribute called filename to the
    newly converted object, but it seems like filenames should probably be
    kept??

    opinions? suggestions?

    thanks in advance


  • Fredrik Lundh

    #2
    Re: pil bug?

    John Smith wrote:
    [color=blue]
    > Hello, I don't know if this is a bug or not, but when you convert an image
    > from one mode to another, the object's filename gets lost in the conversion
    > process.[/color]

    the filename attribute is only valid for image objects that are
    created from files.

    </F>




    Comment

    Working...