imgcrush.jpg.JPGProcessor Class Reference
List of all members.
Detailed Description
Handles JPG file generation and it's settings.
Definition at line 8 of file jpg.py.
Member Function Documentation
def imgcrush.jpg.JPGProcessor.__init__ |
( |
|
self |
) |
|
Constructor.
Data members:
MinQuality : Minimal JPG quality to use. Can be int 1-100.
Step : Step to increase quality by when generating files.
Interlace : Generate interlaced JPG images ?
Optimize : Generate images with optimized JPG compression?
SFactors : Subsampling factors to use when generating images.
"standard" means common factors 1x1,2x1 and 2x2 are used.
"all" means that all available factors are used.
Otherwise this is a string of comma separated factors
in axb format.
Available factors are:
1x1 (no subsampling)
1x2
1x4
2x1
2x2
2x4
4x1
4x2
Grayscale : Generate grayscale JPG images ?
Optimizations : Level of optimization to use:
0 - none
1 - lossless optimizations (same results as with none)
2 - some optimizations
3 - more optimizations
4 - all optimizations
Definition at line 11 of file jpg.py.
def imgcrush.jpg.JPGProcessor.get_grayscale_vals |
( |
|
self |
) |
|
Parses stored grayscale data, returns list of used grayscale values.
Definition at line 180 of file jpg.py.
def imgcrush.jpg.JPGProcessor.get_interlace_vals |
( |
|
self |
) |
|
Parses stored interlace data, returns list of used interlace values.
Definition at line 166 of file jpg.py.
def imgcrush.jpg.JPGProcessor.get_max_files |
( |
|
self |
) |
|
Returns maximum number of files generated in optimization.
Used for % feedback.
Definition at line 203 of file jpg.py.
def imgcrush.jpg.JPGProcessor.get_optimize_vals |
( |
|
self |
) |
|
Parses stored optimize data, returns list of used optimize values.
Definition at line 173 of file jpg.py.
def imgcrush.jpg.JPGProcessor.get_quality_vals |
( |
|
self |
) |
|
Parses stored quality settings, returns list of used quality values.
Definition at line 144 of file jpg.py.
def imgcrush.jpg.JPGProcessor.get_sfactor_vals |
( |
|
self |
) |
|
Parses stored subsampling factor data and returns a list of factors.
Definition at line 156 of file jpg.py.
def imgcrush.jpg.JPGProcessor.get_vals_str |
( |
|
self, |
|
|
|
str | |
|
) |
| | |
Returns all possible values of setting requested by input string.
Definition at line 187 of file jpg.py.
def imgcrush.jpg.JPGProcessor.process |
( |
|
self, |
|
|
|
reffile, |
|
|
|
filenoext, |
|
|
|
queue = None , |
|
|
|
proc = 0 | |
|
) |
| | |
Generates temporary jpg files and returns a list of them.
Definition at line 215 of file jpg.py.
def imgcrush.jpg.JPGProcessor.set_all |
( |
|
self, |
|
|
|
all | |
|
) |
| | |
Sets all JPG settings according to given mode.
fastest means all optimizations and least generated files
extreme means no optimizations and all generated files
heavy means lossless optimizations only - i.e. same result as extreme
Definition at line 43 of file jpg.py.
def imgcrush.jpg.JPGProcessor.set_grayscale |
( |
|
self, |
|
|
|
f | |
|
) |
| | |
Turns generation of grayscale images on.
Definition at line 139 of file jpg.py.
def imgcrush.jpg.JPGProcessor.set_interlace |
( |
|
self |
) |
|
def imgcrush.jpg.JPGProcessor.set_min_quality |
( |
|
self, |
|
|
|
q | |
|
) |
| | |
Sets minimum quality to use
Definition at line 105 of file jpg.py.
def imgcrush.jpg.JPGProcessor.set_optimizations |
( |
|
self, |
|
|
|
opt | |
|
) |
| | |
Set optimization level to use.
Definition at line 97 of file jpg.py.
def imgcrush.jpg.JPGProcessor.set_optimize |
( |
|
self |
) |
|
Turns optimized compression on.
Definition at line 120 of file jpg.py.
def imgcrush.jpg.JPGProcessor.set_sfactors |
( |
|
self, |
|
|
|
f | |
|
) |
| | |
Sets subsampling factors to use.
Definition at line 125 of file jpg.py.
def imgcrush.jpg.JPGProcessor.set_step |
( |
|
self, |
|
|
|
s | |
|
) |
| | |
Sets step to increase quality by.
Definition at line 110 of file jpg.py.
The documentation for this class was generated from the following file: