forked from external-repos/squoosh
fix ordering of preprocessors
This commit is contained in:
@@ -130,14 +130,14 @@ async function preprocessImage(
|
||||
let processedData = data;
|
||||
const { rotate, flip, crop } = preprocessorState;
|
||||
|
||||
if (rotate.rotate !== 0) {
|
||||
processedData = await workerBridge.rotate(signal, processedData, rotate);
|
||||
}
|
||||
|
||||
if (flip && (flip.horizontal || flip.vertical)) {
|
||||
processedData = await workerBridge.flip(signal, processedData, flip);
|
||||
}
|
||||
|
||||
if (rotate.rotate !== 0) {
|
||||
processedData = await workerBridge.rotate(signal, processedData, rotate);
|
||||
}
|
||||
|
||||
if (crop && (crop.left || crop.top || crop.right || crop.bottom)) {
|
||||
processedData = await workerBridge.crop(signal, processedData, crop);
|
||||
}
|
||||
@@ -385,7 +385,6 @@ export default class Compress extends Component<Props, State> {
|
||||
private onTransformUpdated = ({
|
||||
preprocessorState,
|
||||
}: { preprocessorState?: PreprocessorState } = {}) => {
|
||||
console.log('onTransformUpdated', preprocessorState);
|
||||
if (preprocessorState) {
|
||||
this.onPreprocessorChange(preprocessorState);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user