Skip to content

PIL.UnidentifiedImageError: cannot identify image file (DDS file) #7517

@finalcraftRu

Description

@finalcraftRu

Hello! i try to make .DDS to .PNG converter but when i call code it raises PIL.UnidentifiedImageError: cannot identify image file

# Imports
from PIL import Image
import os

# Define names
file = 'C:\DDS\Portrait_Britain_Alan_Brooke.dds'
l = len(os.listdir("SOV"))+1
name = f'SOV/{l}.png'

# Load image
with Image.open(file) as im: # in this line error
    im.save(name)

screenshot of console:
error
this file:
Portrait_Britain_Alan_Brooke.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions