Comments (9)
Thanks for the feedback, but I'm not following. The sample code is valid.
Are you saying the sample made you think you could only output to a file, or did you have a problem running it?
from photosauce.
Yes I get an error stating that I need to be using Stream and not FileStream. I copied the example on the readme and it gives me that same error.
from photosauce.
Stream is an abstract class, so you can't possibly pass one to anything. You need to use a concrete implementation of Stream
, and FileStream is one such implementation. I can't imagine what's giving you the error you mentioned, unless you're using some other class called FileStream
and not a System.IO.FileStream
.
from photosauce.
I'm using System.IO.FileStream
and still seeing that error, I'm attaching what VS is displaying to me.
from photosauce.
I'm baffled. The first overload in that list matches the method it says it can't resolve. I've just tried the example code in a new project, and it's working as expected. Here's my VS (tried it in 2015 and 2017, .NET 4.6 and .NET Core 1.1) showing it has resolved the correct (string, Stream, ProcessImageSettings) overload with those arguments.
I did find a problem with the nuget package, though. It has a frameworkAssembly reference to System.Runtime, which might be causing a conflict between versions of some of the System classes. If you're on the full .NET Framework, can you check your project references and see if System.Runtime is there? If you see it, try removing it.
from photosauce.
I do see System.Runtime in there, but it's not letting me remove it. I'm using .NET core 1.1 btw
from photosauce.
Ah, ok. it needs to be there for .NET Core. I'm still investigating. You on VS 2017?
from photosauce.
Yes, so interesting enough, it builds without error but I still see the error. I'm curious if ReSharper is the problem here. I tried it on another copy of VS and it seems to be fine.
I'm guessing ReSharper is just being super picky or maybe I discovered a bug :)
from photosauce.
Good to know. I reckon it's a conflict with resolving those System classes, but I'm not sure if ReSharper is at fault or if I've done something strange. I'll do a bit more testing. Thanks for the heads-up anyway.
from photosauce.
Related Issues (20)
- Issue with WebP support HOT 15
- System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. (Parameter 'length') HOT 9
- Add PhotoSauce.NativeCodecs.Mozjpeg HOT 6
- AVIF Encoder HOT 4
- This is awesome ❤where is the Donate button? HOT 1
- GIF animations with mixed disposal methods not handled correctly HOT 2
- Orientation is not rotating properly HOT 1
- System.Runtime.InteropServices.COMException at PhotoSauce.MagicScaler.WicPlanarCache.loadBuffer
- Problem with certain PNG images HOT 8
- Transparent Color on PadTransform HOT 1
- RobiniaDocs API Explorer
- Update libwebp HOT 4
- Option to retain gif loop count when resizing HOT 6
- Could not load type 'PhotoSauce.MagicScaler.Converters.ChannelChanger`1' HOT 8
- ColorMatrixTransform does not unpremultiply/premultiply HOT 1
- Default JPEG encoding options are not publicly accessible HOT 4
- EncoderInfo not set correctly if output to Stream
- MagicScalar Linux issue
- libpng throws bad adaptive filter will abort writing result HOT 3
- libpng fails to convert several files that WIC can handle HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from photosauce.