 |
Perfectly Clear SDK Documentation
10.7.1.1191
|
Go to the documentation of this file.
10 #if defined(PFCIMAGEFILEDLL_LIBRARY)
11 # define PFCIMAGEFILEDLLSHARED_EXPORT __declspec(dllexport)
13 # define PFCIMAGEFILEDLLSHARED_EXPORT __declspec(dllimport)
16 # define PFCIMAGEFILEDLLSHARED_EXPORT
148 bool SaveImageFile(
const char *filename,
int quality,
bool bConvertToOriginalColorSpace,
bool bEmbedOriginalMetadata);
159 bool SaveImageFile(
const char *filename,
PFC_FILETYPE type,
int quality,
bool bConvertToOriginalColorSpace,
bool bEmbedOriginalMetadata);
168 void AllocBuffer(
int width,
int height,
int bytes_per_pixel,
int stride);
169 int pfcImageFormat();
230 bool ConvertToSRGB();
231 bool ConvertFromSRGBToOriginal();
232 bool ConvertFromSRGBToOutput();
233 bool applyColorTransform(
void* hTransform);
235 unsigned char* allocDataFromFile(
const char* filename,
long& size)
const;
237 PFC_FILE_LOAD_STATUS read_jpeg_file(
const char *filename,
bool bConvertToSRGB,
const char *iccFolderPath );
238 int write_jpeg_file(
const char *filename,
int quality,
bool bConvertToOriginalColorSpace,
bool bEmbedOriginalMetadata );
239 int compress_jpeg_buffer(
unsigned char** destination,
int quality,
bool bConvertToOriginalColorSpace,
bool bEmbedOriginalMetadata );
240 PFC_FILE_LOAD_STATUS expand_jpeg(
unsigned char *data,
long size,
bool bConvertToSRGB,
const char *iccFolderPath );
248 int compress_webp(
unsigned char** data,
float quality);
249 bool write_webp(
const char *filename,
float quality);
251 bool write_rawdump(
const char *basename);
252 bool write_png(
const char *filename,
bool bConvertToOriginalColorSpace);
253 int compress_png(
unsigned char** data,
bool bConvertToOriginalColorSpace);
255 void read_exif_data(
unsigned char *data,
long size,
unsigned char **buf,
unsigned int *bufLen,
bool bFillReferencedICC,
int *iEXIFOrientation);
257 void* hTransformToSRGB;
258 void* hTransformSRGBToOriginal;
260 unsigned int embeddedICCLen;
261 unsigned char* embeddedICCBuf;
263 unsigned int iccInputFormat;
264 unsigned int iccOutputFormat;
265 unsigned int outputICCLen;
266 unsigned char* outputICCBuf;
268 bool bIgnoreNonembeddedIcc;
270 std::string originalPath;
271 void* originalExifData;
272 void* originalIptcData;
275 int jpeg_color_space;
278 int m_iEXIFOrientation;
285 int m_jfif_density_unit;
286 int m_jfif_x_density;
287 int m_jfif_y_density;
289 std::string m_cameraModel;
290 std::string m_exifSoftware;
292 void embedUpdatedThumbnail(
void* ed);
295 #endif // PFCIMAGEFILE_H
const char * cameraModel()
@ PFC_FLASH_FIRED
1: EXIF data shows flash was used
int sourceThumbnailWidth
width of the loaded image thumbnail
int sourceThumbnailHeight
height of the loaded image thumnail
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.
bool expandThumbnailImage
expand the thumbnailImage to get thumbnail dimensions and check validity.
const char * exifSoftware()
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.
void * outputThumbnailBuffer
sets the jpeg compressed image content for the thumbnail to embed when saving the image....
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
bool hasSourceThumbnail
set to true after loading an image and it has a valid jpeg thumbnail
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.
int outputThumbnailBufferSize
size of the compressed image content
bool SetOutputIccProfile(const char *filename)
loads the desired ICC profile from the given path for the output image
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.