bfg-common 1.3.376 → 1.3.377

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.376",
4
+ "version": "1.3.377",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -125,10 +125,12 @@ wdi.CodecVp8 = {
125
125
  G = Math.round(Y - 0.39465 * (U - 128) - 0.5806 * (V - 128))
126
126
  B = Math.round(Y + 2.03211 * (U - 128))
127
127
 
128
- outputData[0 + w * 4 + width * 4 * h] = R
129
- outputData[1 + w * 4 + width * 4 * h] = G
130
- outputData[2 + w * 4 + width * 4 * h] = B
131
- outputData[3 + w * 4 + width * 4 * h] = 255
128
+ // Изменим порядок записи пикселей, чтобы перевернуть изображение
129
+ const flippedIndex = ((height - 1 - h) * width + w) * 4
130
+ outputData[flippedIndex] = R
131
+ outputData[flippedIndex + 1] = G
132
+ outputData[flippedIndex + 2] = B
133
+ outputData[flippedIndex + 3] = 255
132
134
  }
133
135
  }
134
136