Add a 'Stamp' widget.

Place one or multiple stamps on scanned pages in defined locations.

A stamp is understood here as
 - a transparent text in a transparent frame with no borders
 - an opaque text on an opaque background with no borders.

Stamp parameters:
 - text
 - font
 - foreground colour
 - background colour
 - angle of rotation
 - transparency.

Locations:
 - centre
 - cardinal directions
 - inter-cardinal directions.
This commit is contained in:
Saleem Edah-Tally
2025-07-01 22:38:07 +02:00
parent c2c792dd3d
commit a2045aa1f6
38 changed files with 3376 additions and 71 deletions

View File

@@ -10,19 +10,26 @@
#ifndef PIXELTOIMAGEWRITER_H
#define PIXELTOIMAGEWRITER_H
#include "Common.h"
#include "DefsInsaneWidget.h"
#include <string>
#include <vector>
#include <wx/wx.h>
struct StampDescriptor;
/**
* Create an image file from a raw scanned file.\n
* Optionally,\n
* - use an wxImage object from the application\n
* - blend a stamp image on the converted image.\n
*/
class PixelToImageWriter
{
DECLARE_DYNAMIC_CLASS( PixelToImageWriter )
public:
static bool Convert(const std::string& pixelFilePath,
int imageWidth, int imageHeight, int outputFormat = PNG,
wxImage * image = nullptr);
int imageWidth, int imageHeight, std::vector<StampDescriptor*> * descriptors,
int outputFormat = PNG, wxImage * image = nullptr);
};
#endif // PIXELTOIMAGEWRITER_H