Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
imageexporter.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <cstdint>
4 #include <string>
5 #include <vector>
6 
7 #include "geometrize/bitmap/rgba.h"
8 
9 class QImage;
10 
11 namespace geometrize
12 {
13 class Bitmap;
14 struct ShapeResult;
15 }
16 
17 namespace geometrize
18 {
19 
20 namespace exporter
21 {
22 
29 bool exportBitmap(const geometrize::Bitmap& bitmap, const std::string& filePath);
30 
37 bool exportImage(const QImage& image, const std::string& filePath);
38 
47 bool exportImages(const std::vector<QImage>& images, const std::string& targetDir, const std::string& baseFilename, const std::string& fileExtension);
48 
59  const std::vector<geometrize::ShapeResult>& shapes,
60  const std::uint32_t inputWidth,
61  const std::uint32_t inputHeight,
62  const std::uint32_t outputWidth,
63  const std::uint32_t outputHeight);
64 
76  const std::vector<geometrize::ShapeResult>& shapes,
77  std::uint32_t inputWidth,
78  std::uint32_t inputHeight,
79  std::uint32_t outputWidth,
80  std::uint32_t outputHeight,
81  const std::string& filePath);
82 
97  const std::vector<geometrize::ShapeResult>& shapes,
98  std::uint32_t inputWidth,
99  std::uint32_t inputHeight,
100  std::uint32_t outputWidth,
101  std::uint32_t outputHeight,
102  const std::string& targetDir,
103  const std::string& baseFilename,
104  const std::string& fileExtension);
105 
106 }
107 
108 }
bool exportRasterizedSvg(const std::vector< geometrize::ShapeResult > &shapes, const std::uint32_t inputWidth, const std::uint32_t inputHeight, const std::uint32_t outputWidth, const std::uint32_t outputHeight, const std::string &filePath)
exportRasterizedSvg Exports the shape data as an image by rasterizing an SVG rendered from the shape ...
Definition: imageexporter.cpp:74
bool exportImage(const QImage &image, const std::string &filePath)
exportImage Exports the image data to an image format that Qt supports (depending on the file extensi...
Definition: imageexporter.cpp:30
QImage renderSvgShapeDataToImage(const std::vector< geometrize::ShapeResult > &shapes, const std::uint32_t inputWidth, const std::uint32_t inputHeight, const std::uint32_t outputWidth, const std::uint32_t outputHeight)
renderSvgShapeDataToImage Renders the given shape data to an image via an SVG.
Definition: imageexporter.cpp:46
bool exportBitmap(const geometrize::Bitmap &bitmap, const std::string &filePath)
exportBitmap Exports the Geometrize bitmap data to an image format that Qt supports (depending on the...
Definition: imageexporter.cpp:24
bool exportRasterizedSvgs(const std::vector< geometrize::ShapeResult > &shapes, std::uint32_t inputWidth, std::uint32_t inputHeight, std::uint32_t outputWidth, std::uint32_t outputHeight, const std::string &targetDir, const std::string &baseFilename, const std::string &fileExtension)
exportRasterizedSvgs Exports the shape data to images by rasterizing SVGs rendered from the shape dat...
Definition: imageexporter.cpp:86
bool exportImages(const std::vector< QImage > &images, const std::string &targetDir, const std::string &baseFilename, const std::string &fileExtension)
exportImages Exports the image data to an image format that Qt supports (depending on the file extens...
Definition: imageexporter.cpp:35