I want to write image tags (keywords tag) with Taglib# library (GitHub, NuGet Install-Package taglib), so I used this example and this tutorial. Based on it I wrote this method: using TagLib; public void AddTagsToImage() { string path = @"C:\image.jpg"; string[] tagset = new string[] { "tag1", "tag2", "tag3" }; [...] read more
I would like to test the following class but I/O and sealed class dependencies are making it quite hard. public class ImageDrawingCombiner { /// <summary> /// Save image to a specified location in path /// </summary> /// <param name="path">Location to save the image</param> /// <param name="surface">The image as canvas</param> public [...] read more
I'm trying to stream an image file with the simple code below. Stream stream = File.OpenRead(myFileInfo.ToString()); When I do it, Visual Studio send me an exception. This file is a simple jpeg. In Debug mode, I see with the BitmapDecoder class that my file has not Frames. In comparission with [...] read more
On adding details on a jpeg images like title,tags etc gives the following error(Windows 10 /64 bit)- > ERROR 0x88982F72 :Failed to read from the stream I have changed the security settings to "FULL CONTROL" for all groups and users but the error still persists. Please let me know how [...] read more
This is a follow up question to Unit testing with I/O dependencies. How do I make PngBitmapEncoder to accept wrapped/mocked FileStream? In BitmapService.SaveBitmapAsPngImage() I want to assert that bitmap encoder calls stream save: bitmapEncoder.Save(outStream.StreamInstance); Rhino mock test which needs "a valid" FileStream for the PngBitmapEncoder: [Test] public void BitmapService_Should_SaveBitmapAsPngImage_RhinoMocks() { [...] read more
We're getting this weird exception when trying to create a BitmapDecoder off an ASP.Net response stream. This is the line of code that throws the exception: BitmapDecoder dec = BitmapDecoder.Create( Request.Files[0].InputStream, BitmapCreateOptions.PreservePixelFormat, BitmapCacheOption.OnLoad); Here's some info on the file being uploaded: > Filename: bank statement.jpg, Content length: 266041, Mime type: [...] read more
This picture can't be displayed Anything else will do. Image URL: http://eyy250.com/132.jpg <Grid> <Image Source="http://eyy250.com/132.jpg"></Image> </Grid> read more