Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
fx_codec.cpp
Go to the documentation of this file.
1// Copyright 2014 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "core/fxcodec/fx_codec.h"
8
9#include <utility>
10
11#include "core/fxge/dib/fx_dib.h"
12
13namespace fxcodec {
14
15#ifdef PDF_ENABLE_XFA
17
19#endif // PDF_ENABLE_XFA
20
21void ReverseRGB(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels) {
22 if (pDestBuf == pSrcBuf) {
23 for (int i = 0; i < pixels; i++) {
24 std::swap(pDestBuf[0], pDestBuf[2]);
25 pDestBuf += 3;
26 }
27 } else {
28 for (int i = 0; i < pixels; i++) {
29 ReverseCopy3Bytes(pDestBuf, pSrcBuf);
30 pDestBuf += 3;
31 pSrcBuf += 3;
32 }
33 }
34}
35
36} // namespace fxcodec
void ReverseCopy3Bytes(uint8_t *dest, const uint8_t *src)
Definition fx_dib.h:154
void ReverseRGB(uint8_t *pDestBuf, const uint8_t *pSrcBuf, int pixels)
Definition fx_codec.cpp:21