Image import for the Graphics editor that keeps the image's own palette order and pixel indices. More...
#include <array>#include <cstdint>#include <string>#include <string_view>#include <vector>#include "absl/status/statusor.h"#include "util/indexed_png.h"
Go to the source code of this file.
Classes | |
| struct | yaze::editor::ImportedSheetImage |
Namespaces | |
| namespace | yaze |
| namespace | yaze::editor |
| Editors are the view controllers for the application. | |
Enumerations | |
| enum class | yaze::editor::ImportedImageSource { yaze::editor::kIndexedPng , yaze::editor::kPaletteStrip } |
Functions | |
| absl::StatusOr< ImportedSheetImage > | yaze::editor::ImportSheetImage (const util::PngImage &png) |
| Converts a decoded PNG without re-quantizing it. | |
| absl::StatusOr< ImportedSheetImage > | yaze::editor::ImportSheetImagePng (const std::vector< uint8_t > &png_bytes) |
| Decodes PNG bytes (file or clipboard) and calls ImportSheetImage. | |
| absl::StatusOr< std::vector< uint8_t > > | yaze::editor::EncodeImportedSheetTiles (const ImportedSheetImage &image, int bpp) |
| absl::StatusOr< std::vector< uint8_t > > | yaze::editor::EncodeImportedSheetPng (const ImportedSheetImage &image) |
| Re-encodes the art (without the strip) as an indexed PNG in index order. | |
| std::string | yaze::editor::DescribeImportedSheetImage (const ImportedSheetImage &image) |
| "128x32 indexed PNG, 8 colors (strip removed), highest index 7". | |
| absl::StatusOr< std::vector< int > > | yaze::editor::PreviewPaletteSlots (std::string_view group_name, size_t palette_size, int row, int count) |
Image import for the Graphics editor that keeps the image's own palette order and pixel indices.
Two inputs are accepted, from a PNG file or the clipboard:
Indexed PNGs that carry the same strip (swatch k filled with index k) have it removed too. Nothing here touches the ROM or editor state.
Definition in file sheet_image_import.h.