-
-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: Best way to load and save files from a buffer when file type is not known #37
Comments
- Support mixed images and constants within Bandrank() and Bandjoin(). - Check for null pointer from vips_image_write_to_memory().
libvips has two useful functions to quickly identify the image type: I just made these functions available in NetVips with commit 3fffefc. Note that these functions will not detect truncated images, it just performs some basic verification of image metadata. For example, reading a buffer with If you also want to detect broken images, you can use this: net-vips/samples/NetVips.Samples/Samples/IdentifyExtension.cs Lines 40 to 63 in 3fffefc
|
Thanks for the prompt attention, when is this shipping on nuget? |
I'm a bit busy with college and other side projects these days, but I hope to release NetVips 1.1.0 a few days after libvips 8.8.1 is released (libvips 8.8.1 will be released within a few days). Version 1.1.0 is more or less ready to be shipped (:shipit:). NetVips.Native takes most of the time, because I try to keep the dependencies up-to-date (where possible). If you want to test this earlier, you can use the nightly version of NetVips. Add the <packageSources>
<add key="netvips-nightly" value="https://ci.appveyor.com/nuget/net-vips" />
</packageSources> And update NetVips to version 1.1.0.140-develop. |
NetVips 1.1.0-rc3 is released on NuGet. If there's nothing reported for a week, this will become 1.1.0 final. |
|
NetVips v1.1.0 is now available. |
I'm loading images from the
IFormFile
container. I'm not sure what the best way is to find the image type so that I can save the images in the original format they were uploaded in.IFormFile.ContentType
might not be reliable. I'm aware that libvips sniffs the first few bytes when loading a file from disk, is there a way to replicate that behaviour in this library? Perhaps to sniff from the intermediary buffer I'm using to load the image.The text was updated successfully, but these errors were encountered: