1#ifndef YAZE_APP_EDITOR_GRAPHICS_SHEET_IMAGE_IMPORT_H
2#define YAZE_APP_EDITOR_GRAPHICS_SHEET_IMAGE_IMPORT_H
10#include "absl/status/statusor.h"
44 std::vector<std::array<uint8_t, 4>>
palette;
55 const std::vector<uint8_t>& png_bytes);
74 std::string_view group_name,
size_t palette_size,
int row,
int count);
Editors are the view controllers for the application.
std::string DescribeImportedSheetImage(const ImportedSheetImage &image)
"128x32 indexed PNG, 8 colors (strip removed), highest index 7".
absl::StatusOr< ImportedSheetImage > ImportSheetImagePng(const std::vector< uint8_t > &png_bytes)
Decodes PNG bytes (file or clipboard) and calls ImportSheetImage.
absl::StatusOr< std::vector< uint8_t > > EncodeImportedSheetTiles(const ImportedSheetImage &image, int bpp)
absl::StatusOr< std::vector< int > > PreviewPaletteSlots(std::string_view group_name, size_t palette_size, int row, int count)
absl::StatusOr< ImportedSheetImage > ImportSheetImage(const util::PngImage &png)
Converts a decoded PNG without re-quantizing it.
absl::StatusOr< std::vector< uint8_t > > EncodeImportedSheetPng(const ImportedSheetImage &image)
Re-encodes the art (without the strip) as an indexed PNG in index order.
std::vector< uint8_t > indices
ImportedImageSource source
std::vector< std::array< uint8_t, 4 > > palette
A decoded PNG: palette indices for indexed files, RGBA otherwise.