mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 17:49:52 +00:00
Implement sRGB color conversion (#510)
* Add sRGB -> RGB conversion before resize * Add clamping for color space conversions * Clip for demultiplication as well * Fixing linear <-> srgb conversion * Update benchmark * Decouple srgb calculations * Generate lookup tables * Update src/codecs/resize/options.tsx * Defaulting on, renaming, removing redundant state
This commit is contained in:
@@ -17,6 +17,7 @@ export interface BrowserResizeOptions extends ResizeOptionsCommon {
|
||||
export interface WorkerResizeOptions extends ResizeOptionsCommon {
|
||||
method: WorkerResizeMethods;
|
||||
premultiply: boolean;
|
||||
linearRGB: boolean;
|
||||
}
|
||||
|
||||
export interface VectorResizeOptions extends ResizeOptionsCommon {
|
||||
@@ -41,4 +42,5 @@ export const defaultOptions: ResizeOptions = {
|
||||
method: 'lanczos3',
|
||||
fitMethod: 'stretch',
|
||||
premultiply: true,
|
||||
linearRGB: true,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user