Skip to content

[Bug Report] 导出图片时,导出的文件扩展名为PNG但内容是JPEG #1601

@yanhuixie

Description

@yanhuixie

Prerequisites

Version

0.10.3

Reproduction Link

No response

Describe the Bug

const imgData = canvas.toDataURL('image/jpeg');

aLink.download = ${fileName}.png;

请参考这两行代码,exportScreenShot时指定了jpeg格式,fileDownload 时写死了png扩展名,所以导致了不一致。
目前fileDownload 只有这一处地方使用,但是从函数的设计意图来看,似乎是通用的,所以扩展名可能需要根据条件来枚举?

System Information

Contributing

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐞bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions