mirror of
https://github.com/lovell/sharp.git
synced 2025-12-19 07:15:08 +01:00
Add support for libvips' PPM and FITS loaders #347
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,9 @@ namespace sharp {
|
||||
WEBP,
|
||||
TIFF,
|
||||
MAGICK,
|
||||
OPENSLIDE
|
||||
OPENSLIDE,
|
||||
PPM,
|
||||
FITS
|
||||
};
|
||||
|
||||
// How many tasks are in the queue?
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user