00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef __PLGRAPHICS_IMAGELOADER_JPG_H__
00024 #define __PLGRAPHICS_IMAGELOADER_JPG_H__
00025 #pragma once
00026
00027
00028
00029
00030
00031 #include "PLGraphics/Image/ImageLoader.h"
00032
00033
00034
00035
00036
00037 namespace PLGraphics {
00038
00039
00040
00041
00042
00043 class Image;
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056 class ImageLoaderJPG : public ImageLoader {
00057
00058
00059
00060
00061
00062 pl_class(PLGRAPHICS_RTTI_EXPORT, ImageLoaderJPG, "PLGraphics", PLGraphics::ImageLoader, "Image loader implementation for JPEG (\"Joint Photographic Experts Group\") file formats")
00063
00064 pl_properties
00065 pl_property("Formats", "jpg,jpeg,jpe,jif,jfif,jfi,JPG,JPEG,JPE,JIF,JFIF,JFI")
00066 pl_property("Load", "1")
00067 pl_property("Save", "1")
00068 pl_properties_end
00069
00070 pl_constructor_0(DefaultConstructor, "Default constructor", "")
00071
00072 pl_method_2(Load, pl_ret_type(bool), Image&, PLCore::File&, "Load method, no fancy upsampling and no interblock smoothing is applied", "")
00073 pl_method_4(LoadParams, pl_ret_type(bool), Image&, PLCore::File&, bool, bool, "Load method. Parameters: First 'bool' parameter determines whether or not fancy upsampling is applied, second 'bool' parameter whether or not interblock smoothing is applied.", "")
00074 pl_method_2(Save, pl_ret_type(bool), const Image&, PLCore::File&, "Save method, using 100% quality setting", "")
00075 pl_method_3(SaveParams, pl_ret_type(bool), const Image&, PLCore::File&, PLCore::uint32, "Save method, quality (0...100) as first parameter", "")
00076 pl_class_end
00077
00078
00079
00080
00081
00082 public:
00083 PLGRAPHICS_API bool Load(Image &cImage, PLCore::File &cFile);
00084 PLGRAPHICS_API bool LoadParams(Image &cImage, PLCore::File &cFile, bool bBlockSmoothing, bool bFancyUpsampling);
00085 PLGRAPHICS_API bool Save(const Image &cImage, PLCore::File &cFile);
00086 PLGRAPHICS_API bool SaveParams(const Image &cImage, PLCore::File &cFile, PLCore::uint32 nQuality);
00087
00088
00089
00090
00091
00092 public:
00093
00094
00095
00096
00097 PLGRAPHICS_API ImageLoaderJPG();
00098
00099
00100
00101
00102
00103 PLGRAPHICS_API virtual ~ImageLoaderJPG();
00104
00105
00106 };
00107
00108
00109
00110
00111
00112 }
00113
00114
00115 #endif // __PLGRAPHICS_IMAGELOADER_JPG_H__