chromium/third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_decoder.cc

// Copyright 2008 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_decoder.h"

#include "third_party/blink/renderer/platform/image-decoders/bmp/bmp_image_reader.h"
#include "third_party/blink/renderer/platform/image-decoders/fast_shared_buffer_reader.h"

namespace blink {

// Number of bytes in .BMP used to store the file header. This is effectively
// `sizeof(BITMAPFILEHEADER)`, as defined in
// https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-bitmapfileheader
static const wtf_size_t kSizeOfFileHeader =;

BMPImageDecoder::BMPImageDecoder(AlphaOption alpha_option,
                                 ColorBehavior color_behavior,
                                 wtf_size_t max_decoded_bytes)
    :{}

BMPImageDecoder::~BMPImageDecoder() = default;

String BMPImageDecoder::FilenameExtension() const {}

const AtomicString& BMPImageDecoder::MimeType() const {}

void BMPImageDecoder::OnSetData(scoped_refptr<SegmentReader> data) {}

bool BMPImageDecoder::SetFailed() {}

void BMPImageDecoder::DecodeSize() {}

void BMPImageDecoder::Decode(wtf_size_t) {}

void BMPImageDecoder::Decode(bool only_size) {}

bool BMPImageDecoder::DecodeHelper(bool only_size) {}

bool BMPImageDecoder::ProcessFileHeader(wtf_size_t& img_data_offset) {}

bool BMPImageDecoder::GetFileType(const FastSharedBufferReader& fast_reader,
                                  char* buffer,
                                  const char*& file_header,
                                  uint16_t& file_type) const {}

}  // namespace blink