 |
Perfectly Clear SDK Documentation
10.0.0.495
|
Go to the documentation of this file.
7 #if defined(PFCIMAGEFILEDLL_LIBRARY)
8 # define PFCIMAGEFILEDLLSHARED_EXPORT __declspec(dllexport)
10 # define PFCIMAGEFILEDLLSHARED_EXPORT __declspec(dllimport)
13 # define PFCIMAGEFILEDLLSHARED_EXPORT
97 PFCImageFile(
int width,
int height,
int bytes_per_pixel,
int stride);
145 bool SaveImageFile(
const char *filename,
int quality,
bool bConvertToOriginalColorSpace,
bool bEmbedOriginalMetadata);
156 bool SaveImageFile(
const char *filename,
PFC_FILETYPE type,
int quality,
bool bConvertToOriginalColorSpace,
bool bEmbedOriginalMetadata);
158 void AllocBuffer(
int width,
int height,
int bytes_per_pixel,
int stride);
159 int pfcImageFormat();
160 int exifOrientation();
186 bool ConvertToSRGB();
187 bool ConvertFromSRGBToOriginal();
188 bool applyColorTransform(
void* hTransform);
190 unsigned char* allocDataFromFile(
const char* filename,
long& size);
192 PFC_FILE_LOAD_STATUS read_jpeg_file(
const char *filename,
bool bConvertToSRGB,
const char *iccFolderPath );
193 int write_jpeg_file(
const char *filename,
int quality,
bool bConvertToOriginalColorSpace,
bool bEmbedOriginalMetadata );
194 int compress_jpeg_buffer(
unsigned char** destination,
int quality,
bool bConvertToOriginalColorSpace,
bool bEmbedOriginalMetadata );
195 PFC_FILE_LOAD_STATUS expand_jpeg(
unsigned char *data,
long size,
bool bConvertToSRGB,
const char *iccFolderPath );
203 int compress_webp(
unsigned char** data,
float quality);
204 bool write_webp(
const char *filename,
float quality);
206 bool write_rawdump(
const char *basename);
207 bool write_png(
const char *filename,
bool bConvertToOriginalColorSpace);
208 int compress_png(
unsigned char** data,
bool bConvertToOriginalColorSpace);
210 void read_exif_data(
unsigned char *data,
long size,
unsigned char **buf,
unsigned int *bufLen,
bool bFillReferencedICC,
int *iEXIFOrientation);
212 void* hTransformToSRGB;
213 void* hTransformSRGBToOriginal;
214 unsigned int embeddedICCLen;
215 unsigned char* embeddedICCBuf;
217 bool bIgnoreNonembeddedIcc;
219 std::string originalPath;
220 void* originalExifData;
223 int jpeg_color_space;
226 int m_iEXIFOrientation;
233 #endif // PFCIMAGEFILE_H
@ PFC_FLASH_FIRED
1: EXIF data shows flash was used
int CompressImageBuffer(unsigned char **destination, PFC_FILETYPE type, int quality, bool bConvertToOriginalColorSpace, bool bEmbedOriginalMetadata)
Compresses the image to the given type and writes compressed data to destination buffer.
PFCImageFile()
Constructs empty PFCImageFile, to be filled with LoadImageFile()
PFC_FILE_LOAD_STATUS
Return status values.
@ PFC_FLASH_NOT_FIRED
0: EXIF data shows flash was not used
@ LOAD_FAILED_CONVERT_SRGB
Error: failed to convert to sRGB.
PFC_FLASH_STATUS
Flash status as read if present on the exif section. Specificallly status of bit 0 from exif tag 3738...
unsigned char * raw_image
PFCImageFile(int width, int height, const PFCImageFile &model)
Constructs PFCImageFile with allocation for image of given size and format.
PFC_FILETYPE
Type for compressing/decomrpessing a buffer.
PFC_FILE_LOAD_STATUS ExpandImageBuffer(char *data, long size, PFC_FILETYPE type, bool bConvertToSRGB, const char *iccFolderPath)
Expands the image file data provided in a buffer.
@ PFC_FLASH_UNKNOWN
-1: Cannot determine flash state
PFCImageFile(int width, int height, int bytes_per_pixel, int stride)
Constructs PFCImageFile with allocation for image of given size.
@ LOAD_ERROR_UNSUPPORTED
Error: unsupported file.
PFC_FILE_LOAD_STATUS LoadImageFile(const char *filename, PFC_FILETYPE type, bool bConvertToSRGB, const char *iccFolderPath)
Load JPEG, PNG or RAW from file on disk.
bool SaveImageFile(const char *filename, PFC_FILETYPE type, int quality, bool bConvertToOriginalColorSpace, bool bEmbedOriginalMetadata)
Write image data to file - specify file type with PFC_FILETYPE.
bool SaveImageFile(const char *filename, int quality, bool bConvertToOriginalColorSpace, bool bEmbedOriginalMetadata)
Write image data to file - specify file type with filename extension.
PFC_FLASH_STATUS flashStatus
flash status from the exif section if present
PFCImageFile Class to encapsulate file handling.
PFC_FILE_LOAD_STATUS LoadImageFile(const char *filename, bool bConvertToSRGB, const char *iccFolderPath)
Load JPEG, PNG or RAW from file on disk.