Add support for libvips' PPM and FITS loaders #347

This commit is contained in:
Lovell Fuller
2016-01-31 19:39:21 +00:00
parent 2656c69d99
commit 56508e8d79
6 changed files with 15 additions and 3 deletions

View File

@@ -94,6 +94,10 @@ namespace sharp {
imageType = ImageType::OPENSLIDE;
} else if (EndsWith(loader, "TiffFile")) {
imageType = ImageType::TIFF;
} else if (EndsWith(loader, "Ppm")) {
imageType = ImageType::PPM;
} else if (EndsWith(loader, "Fits")) {
imageType = ImageType::FITS;
} else if (EndsWith(loader, "Magick") || EndsWith(loader, "MagickFile")) {
imageType = ImageType::MAGICK;
}

View File

@@ -15,7 +15,9 @@ namespace sharp {
WEBP,
TIFF,
MAGICK,
OPENSLIDE
OPENSLIDE,
PPM,
FITS
};
// How many tasks are in the queue?

View File

@@ -120,6 +120,8 @@ class MetadataWorker : public AsyncWorker {
case ImageType::TIFF: baton->format = "tiff"; break;
case ImageType::MAGICK: baton->format = "magick"; break;
case ImageType::OPENSLIDE: baton->format = "openslide"; break;
case ImageType::PPM: baton->format = "ppm"; break;
case ImageType::FITS: baton->format = "fits"; break;
case ImageType::UNKNOWN: break;
}
// VipsImage attributes