Allow floating point density input (#1362)

Metadata output will still remain integer
This commit is contained in:
Axel Eirola
2018-09-01 10:58:30 +03:00
committed by Lovell Fuller
parent bf3254cb16
commit 7d48a5ccf4
9 changed files with 28 additions and 18 deletions

View File

@@ -49,7 +49,7 @@ namespace sharp {
char *buffer;
bool failOnError;
size_t bufferLength;
int density;
double density;
int rawChannels;
int rawWidth;
int rawHeight;
@@ -63,7 +63,7 @@ namespace sharp {
buffer(nullptr),
failOnError(FALSE),
bufferLength(0),
density(72),
density(72.0),
rawChannels(0),
rawWidth(0),
rawHeight(0),
@@ -186,7 +186,7 @@ namespace sharp {
/*
Set pixels/mm resolution based on a pixels/inch density.
*/
void SetDensity(VImage image, const int density);
void SetDensity(VImage image, const double density);
/*
Check the proposed format supports the current dimensions.