Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Allow disabling automatic reorientation in `ImageDecoder`

未关闭
#870 3 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
html
领域
api

调研方向

该 issue 将 ImageDecoder 和 ImageDecodeOptions 的 WebIDL 定义确定为切入点;首先检查该提案以及链接的 PDF 和 DCT 参考资料。完成的标准是形成一份已确定的规范,用于禁用方向元数据处理,而无需进行第二次重新定向。

由索引模型根据 Issue 内容生成。

描述

In PDFs, there are frequently images that do have orientation information in the metadata, but they must not be taken into account during rendering.

https://github.com/mozilla/pdf.js is used all over the web and in some browsers, and takes advantage of ImageDecoder when available, leading to ridiculous performance improvement. They would like to not reorient images, or more accurately, not have to have them reoriented twice (once by the browser engine, and once themselves).

Quoting the PDF spec (https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#page=43, bottom of the table):

Parameters that control the decoding process as well as other metadata is embedded within the encoded data
stream using a notation referred to as “markers”. When it defined the use of JPEG images within PostScript data
streams, Adobe System Incorporated defined a particular set of rules pertaining to which markers are to be
recognized, which are to be ignored and which are considered errors. A specific Adobe-defined marker was also
introduced. The exact rules for producing and consuming DCT encoded data within PostScript are provide in
Adobe Technical Note #5116 (reference). PDF DCT Encoding shall exactly follow those rules established by
Adobe for PostScript.

The reference is https://pdfa.org/norm-refs/5116.DCT_Filter.pdf. There is no mention of orientation, and so it has to be ignored for compliance.

I simply propose the following addition to the spec:

partial dict  ImageDecodeOptions {
    boolean ignoreOrientationMetadata = false;
}
主要语言
HTML
星标
1.3k
派生
192
平均合并
21 小时 7 分钟
30 天内合并 PR
8

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

w3c/webcodecs 的其他 Issue

查看 w3c/webcodecs 的全部 Issue

相似的 Issue

更多 Backend & API Design Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。