C# Class SobekCM.Resource_Object.Utilities.Image_Derivative_Creation_Processor

Proceessor class is used for creatig image derivatives for a single package destined for a SobekCM library, including thumbnails, jpeg images, and a service jpeg2000 file
Afficher le fichier Open project: MarkVSullivan/SobekCM-Web-Application Class Usage Examples

Méthodes publiques

Méthode Description
Create_JPEG2000 ( string SourceFileName, string DestinationFilename, string Directory, long ParentLogId, string PackageName ) : bool

Creates a JPEG2000 derivative service file, according to NDNP specs, for display within a SobekCM library

ImageMagick_Create_JPEG ( string Sourcefile, string Finalfile, int Width, int Height, long ParentLogId, string PackageName ) : void

Use ImageMagick to create a JPEG derivative file

Image_Derivative_Creation_Processor ( string Image_Magick_Path, string Kakadu_Path, bool Create_JPEGs, bool Create_JPEG2000s, int JPEG_Width, int JPEG_Height, bool Create_QC_Images, int Thumbnail_Width, int Thumbnail_Height, string TempFolder ) : System

Constructor for a new instance of the Image_Derivative_Creation_Processor class

Image_Magick_Process_TIFF_File ( string LocalTempFile, string ThisTiffFile, string VolumeDirectory, bool MakeThumbnail, int Width, int Height, long ParentLogId, string PackageName ) : void

Process this image via ImageMagick, to create the needed jpeg derivative(s)

Process ( string Package_Directory, string BibID, string VID, string TifFiles, long ParentLogId ) : bool

Processes a single package

Private Methods

Méthode Description
Create_Derivative_Files ( string Directory, string TifFiles, string PackageName, long ParentLogId, string ProcessFolder ) : bool
Kakadu_Create_JPEG2000 ( string Sourcefile, string Finalfile, long ParentLogId, string PackageName ) : bool
OnErrorEncountered ( string NewMessage, long ParentLogID, string BibID_VID ) : void
OnNewProgress ( int Value, int Max ) : void
OnNewTask ( string NewMessage, long ParentLogID, string BibID_VID ) : void
OnProcessComplete ( ) : void

Method Details

Create_JPEG2000() public méthode

Creates a JPEG2000 derivative service file, according to NDNP specs, for display within a SobekCM library
public Create_JPEG2000 ( string SourceFileName, string DestinationFilename, string Directory, long ParentLogId, string PackageName ) : bool
SourceFileName string Complete name (including directory) of the TIFF file to actually process, which is often in a temporary location
DestinationFilename string Name of the resulting JPEG2000 file
Directory string Directory where the resulting JPEG2000 should be created ( usually the directory for the volume )
ParentLogId long Primary key to the parent log entery if this is performed by the builder
PackageName string Name of the package this file belongs to ( BibID : VID )
Résultat bool

ImageMagick_Create_JPEG() public méthode

Use ImageMagick to create a JPEG derivative file
public ImageMagick_Create_JPEG ( string Sourcefile, string Finalfile, int Width, int Height, long ParentLogId, string PackageName ) : void
Sourcefile string Source file
Finalfile string Final file
Width int Width restriction for the resulting jpeg
Height int Height restriction for the resulting jpeg
ParentLogId long Primary key to the parent log entery if this is performed by the builder
PackageName string Name of the package this file belongs to ( BibID : VID )
Résultat void

Image_Derivative_Creation_Processor() public méthode

Constructor for a new instance of the Image_Derivative_Creation_Processor class
public Image_Derivative_Creation_Processor ( string Image_Magick_Path, string Kakadu_Path, bool Create_JPEGs, bool Create_JPEG2000s, int JPEG_Width, int JPEG_Height, bool Create_QC_Images, int Thumbnail_Width, int Thumbnail_Height, string TempFolder ) : System
Image_Magick_Path string Path (and executable name) for the image magick files for processing JPEG images
Kakadu_Path string Path to the Kakadu library for creating JPEG2000's
Create_JPEGs bool Flag indicates whether JPEGs should be created
Create_JPEG2000s bool Flag indicates whether JPEG2000s should be created
JPEG_Width int Width for the JPEGs to be generated
JPEG_Height int Height for the JPEGs to be generated
Create_QC_Images bool Flag indicates if medium size JPEGs should be created for the QC windows application
Thumbnail_Width int Width of the bounding box for the thumbnail
Thumbnail_Height int Height of the bounding box for the thumbnail
TempFolder string Temporary folder, if a temporary folder should be used for processing
Résultat System

Image_Magick_Process_TIFF_File() public méthode

Process this image via ImageMagick, to create the needed jpeg derivative(s)
public Image_Magick_Process_TIFF_File ( string LocalTempFile, string ThisTiffFile, string VolumeDirectory, bool MakeThumbnail, int Width, int Height, long ParentLogId, string PackageName ) : void
LocalTempFile string Complete name (including directory) of the TIFF file to actually process, which is often in a temporary location
ThisTiffFile string Name (excluding extension and directory) for the original TIFF file, to be used for naming of the derivatives
VolumeDirectory string Directory where the derivatives should be created
MakeThumbnail bool Flag indicates whether a thumbnail image should be generated for this TIFF
Width int Requested width limit of the resulting full-size jpeg image to create
Height int Requested height limit of the resulting full-size jpeg image to create
ParentLogId long Primary key to the parent log entery if this is performed by the builder
PackageName string Name of the package this file belongs to ( BibID : VID )
Résultat void

Process() public méthode

Processes a single package
public Process ( string Package_Directory, string BibID, string VID, string TifFiles, long ParentLogId ) : bool
Package_Directory string Directory for the package
BibID string Bibliographic id for the item to derive images for
VID string Volume id for the item to derive images for
TifFiles string List of TIFF files
ParentLogId long Primary key to the parent log entery if this is performed by the builder
Résultat bool