Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zh-cn]: update the translation of CanvasRenderingContext2D.getImageData() method #22003

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tianyeeT
Copy link
Contributor

…Data()` method

Description

Motivation

Additional details

Related issues and pull requests

@tianyeeT tianyeeT requested a review from a team as a code owner June 27, 2024 13:12
@tianyeeT tianyeeT requested review from t7yang and removed request for a team June 27, 2024 13:12
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Jun 27, 2024
Copy link
Contributor

github-actions bot commented Jun 27, 2024

Preview URLs

Flaws (1)

URL: /zh-CN/docs/Web/API/CanvasRenderingContext2D/getImageData
Title: CanvasRenderingContext2D:getImageData() 方法
Flaw count: 1

  • translation_differences:
    • Differences in the important macros (2 in common of 6 possible)
External URLs (2)

URL: /zh-CN/docs/Web/API/CanvasRenderingContext2D/getImageData
Title: CanvasRenderingContext2D:getImageData() 方法

(comment last updated: 2024-07-07 16:16:18)

- 定义此方法的接口:{{domxref("CanvasRenderingContext2D")}}
- {{domxref("ImageData")}} object
- {{domxref("CanvasRenderingContext2D.putImageData()")}}
- [像素操作](/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[mdn-linter] reported by reviewdog 🐶

Suggested change
- [像素操作](/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas)
- [像素操作](/zh-CN/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas)
---

{{APIRef}}

**`CanvasRenderingContext2D.getImageData()`** 返回一个{{domxref("ImageData")}}对象,用来描述 canvas 区域隐含的像素数据,这个区域通过矩形表示,起始点为*(sx, sy)、*宽为*sw、*高为*sh。*
Canvas 2D API 的 **`CanvasRenderingContext2D.getImageData()`** 返回一个{{domxref("ImageData")}}对象,用于描述 canvas 指定区域的隐含像素数据。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

空格

- : 要提取 `ImageData` 的矩形的高度。正值向下延伸,负值向上延伸。
- `settings` {{optional_inline}}
- : 一个具有以下属性的对象:
- `colorSpace`:指定图像数据的颜色空间。可以设置为 `"srgb"` 表示 [sRGB 色彩空间](https://zh.wikipedia.org/wiki/SRGB),或 `"display-p3"` 表示 [display-p3 色彩空间](https://zh.wikipedia.org/wiki/DCI-P3)。
Copy link
Member

@yin1999 yin1999 Jun 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sRGB 色彩空间的维基百科链接是不对的:https://zh.wikipedia.org/wiki/SRGB色彩空间

其他的几个 PR 里面也有类似的情况,请都修复一下。

@@ -1,76 +1,116 @@
---
title: CanvasRenderingContext2D.getImageData()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

标题更新,其他的 PR 也类似

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CanvasRenderingContext2D:getImageData() 方法 吗。之前合并的pr中有CanvasRenderingContext2D.getImageData(),这之间是如何区别的

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

请沿用英文文档的格式,之前合并的那个 PR 我没有注意到标题

- : 要提取 `ImageData` 的矩形的高度。正值向下延伸,负值向上延伸。
- `settings` {{optional_inline}}
- : 一个具有以下属性的对象:
- `colorSpace`:指定图像数据的颜色空间。可以设置为 `"srgb"` 表示 [sRGB 色彩空间](https://zh.wikipedia.org/wiki/SRGB),或 `"display-p3"` 表示 [display-p3 色彩空间](https://zh.wikipedia.org/wiki/DCI-P3)。
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `colorSpace`:指定图像数据的颜色空间。可以设置为 `"srgb"` 表示 [sRGB 色彩空间](https://zh.wikipedia.org/wiki/SRGB),或 `"display-p3"` 表示 [display-p3 色彩空间](https://zh.wikipedia.org/wiki/DCI-P3)。
- `colorSpace`:指定图像数据的颜色空间。可以设置为 `"srgb"` 表示 [sRGB 色彩空间](https://zh.wikipedia.org/wiki/SRGB色彩空间),或 `"display-p3"` 表示 [display-p3 色彩空间](https://zh.wikipedia.org/wiki/DCI-P3)。
---

{{APIRef}}

**`CanvasRenderingContext2D.getImageData()`** 返回一个{{domxref("ImageData")}}对象,用来描述 canvas 区域隐含的像素数据,这个区域通过矩形表示,起始点为*(sx, sy)、*宽为*sw、*高为*sh。*
Canvas 2D API 的 **`CanvasRenderingContext2D.getImageData()`** 返回一个{{domxref("ImageData")}}对象,用于描述 canvas 指定区域的隐含像素数据。
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Canvas 2D API 的 **`CanvasRenderingContext2D.getImageData()`** 返回一个{{domxref("ImageData")}}对象,用于描述 canvas 指定区域的隐含像素数据。
Canvas 2D API 的 **`CanvasRenderingContext2D.getImageData()`** 返回一个 {{domxref("ImageData")}} 对象,用于描述 canvas 指定区域的隐含像素数据。

## 示例

### 使用 `getImageData` 方法
Here is the translation of the example and its details into Chinese:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


## 示例

### 使用 `getImageData` 方法
Here is the translation of the example and its details into Chinese:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Here is the translation of the example and its details into Chinese:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
3 participants