Enlcxx / angular2-resizing-cropping-image

Resize, rotate and crop images(cropper) for Angular 8
https://alyle.io/components/image-cropper
32 stars 6 forks source link

How to increase the resolution of the cropped image. #14

Closed sarath3940 closed 6 years ago

sarath3940 commented 6 years ago

I am using the alyle-ui for image-cropping, and every thing is working perfectly fine. But, the resulting image has a small resolution. I have tried to change height and width in both css, and config part in main file. But, it resulted in occupying a huge portion of the screen. I want the cropping functionality to be shown in a small space, but the resulting image should have higher resolution. Is this possible. If yes, can you please help me with this issue. Thank you. ts css

alyleui commented 6 years ago

I will add extra options

  1. Manual configuration for the output
myConfig = {
   // view cropping
   width: 300,
   heigth: 250
   // output
   output: {
     width: 720,
     heigth: 600
   }
}
  1. Configuration to maintain the resolution of the view For now this is by default
import { LyResizingCroppingImages, LyResizingCroppingImagesConfig, LyResolutionDefault } from 'alyle-ui/resizing-cropping-images';
...
myConfig: LyResizingCroppingImagesConfig = {
   ...
   output: LyResolutionDefault
}
  1. Configuration to maintain the resolution of the original image I think this would be by default, since this would maintain the same resolution of the image, it's as if it would only be cropped
    import { LyResizingCroppingImages, LyResizingCroppingImagesConfig, LyResolutionOriginalImage } from 'alyle-ui/resizing-cropping-images';
    ...
    myConfig = {
       ...
       output: LyResolutionOriginalImage
    }

What do you think? This feature will be implemented in a few days.

sarath3940 commented 6 years ago

Yes. That would be great.

alyleui commented 6 years ago

demo v1.6.0-beta.3

sarath3940 commented 6 years ago

That's awesome dude. You made my project a little more beautiful. Thank's a lot..