onurzorluer / react-image-file-resizer

Resize Local Images with React 🌄 🌅
MIT License
313 stars 41 forks source link

why is the rotation is not "set" #58

Closed Y-Moshe closed 3 years ago

Y-Moshe commented 3 years ago

i used a very simple resize:

const resizedFile = await new Promise<File>(( resolve ) => {
    resizer.imageFileResizer(
      file,
      maxWidth,
      maxHeight,
      'jpeg',
      100,
      0,
      ( file ) => resolve( file as File ),
      'file'
    );
  });

and here u can see I'm setting the rotation to 0, but what if I'm actually meaning is to "SET", like override, not adding, like how it is done currently. according to docs if I'm setting 0 nothing is happening, i get that, but what if i want to "SET" 0, by doing that basically I'm "correcting rotation", is that possible to do?