Use the library as an image resizer?
See original GitHub issueHello,
I let my users change their profile image via the camera gallery and device. Since the upload is directly done to Azure (without transiting by our servers) I need to resize images on the client side.
According to the docs, the Downsampling properties are resizing the image to consume less memory. And since there is a GetImageAsJpgAsync()
, I thought that I could use a non-displayed CachedImage to resize the camera image :
var downsampledImage = new CachedImage {
Source = ImageSource.FromStream(() => media.GetStream()),
DownsampleHeight = 128
};
var jpgBytes = await downsampledImage.GetImageAsJpgAsync(); // exception occurs here
await blockBlob.UploadFromByteArrayAsync(jpgBytes, 0, jpgBytes.Length);
But I get a not-so-helpful NullReferenceException
on the GetImageAsJpgAsync
line. I think the error comes from the library? Am I using it bad?
Issue Analytics
- State:
- Created 8 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
c# - Which free image resizing library can I use for ...
I have used Umbraco and there is very nice ImageGen library there which allows to resize images 'on the fly' and cashes processed...
Read more >Best JavaScript Image Resize Libraries (2022)
Pica is an in-browser image resizing tool that lets you resize a Canvas element, Image element, or Image Bitmap. It outputs the resized...
Read more >How Can I Resize an Image Using Java?
Thumbnailator is an open-source image resizing library for Java that uses progressive bilinear scaling. It supports JPG, BMP, JPEG, WBMP, ...
Read more >Image Resizing in Python | Pillow, Open CV and ImageKit
Here's a technical guide for resizing images in python. Learn to use Pillow, OpenCV, and ImageKit. Check out ImageKit's advantages.
Read more >Python Image Resize With Pillow and OpenCV
Resize Images in Python With OpenCV · Import the OpenCV library: import cv2; import matplotlib.pyplot as plt · Acquire a sample image and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, it has to be rendered. Other operations are better suited for other dedicated libraries like https://github.com/JimBobSquarePants/ImageProcessor and others
I’m developing Xamarin mobile application so for i need capture image and performing Auto edge detection on Image also giving image enhancement like Lightning the Cropped image,any help to complete it.